merge fix
This commit is contained in:
commit
d8b72fd158
3 changed files with 18 additions and 16 deletions
|
|
@ -8,7 +8,7 @@ import {
|
|||
} from "../../constants/constants";
|
||||
import { useDarkStore } from "../../stores/darkStore";
|
||||
import "../../style/ag-theme-shadcn.css"; // Custom CSS applied to the grid
|
||||
import { cn, toTitleCase } from "../../utils/utils";
|
||||
import { cn } from "../../utils/utils";
|
||||
import ForwardedIconComponent from "../genericIconComponent";
|
||||
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
|
||||
import TableOptions from "./components/TableOptions";
|
||||
|
|
@ -40,6 +40,7 @@ const TableComponent = forwardRef<
|
|||
let colDef = props.columnDefs.map((col, index) => {
|
||||
let newCol = {
|
||||
...col,
|
||||
headerName: col.headerName,
|
||||
};
|
||||
if (index === props.columnDefs.length - 1) {
|
||||
newCol = {
|
||||
|
|
@ -141,7 +142,6 @@ const TableComponent = forwardRef<
|
|||
{...props}
|
||||
defaultColDef={{
|
||||
minWidth: 100,
|
||||
autoHeight: true,
|
||||
}}
|
||||
animateRows={false}
|
||||
columnDefs={colDef}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export default function ShortcutsPage() {
|
|||
const combinationToEdit = shortcuts.filter((s) => s.name === selectedRows[0]);
|
||||
const [open, setOpen] = useState(false);
|
||||
const updateUniqueShortcut = useShortcutsStore(
|
||||
(state) => state.updateUniqueShortcut
|
||||
(state) => state.updateUniqueShortcut,
|
||||
);
|
||||
|
||||
function handleRestore() {
|
||||
|
|
@ -97,17 +97,19 @@ export default function ShortcutsPage() {
|
|||
</div>
|
||||
<div className="grid gap-6 pb-8">
|
||||
<div>
|
||||
<TableComponent
|
||||
suppressRowClickSelection={true}
|
||||
domLayout="autoHeight"
|
||||
pagination={false}
|
||||
columnDefs={colDefs}
|
||||
rowData={nodesRowData}
|
||||
onCellDoubleClicked={(e) => {
|
||||
setSelectedRows([e.data.name]);
|
||||
setOpen(true);
|
||||
}}
|
||||
/>
|
||||
{colDefs && nodesRowData.length > 0 && (
|
||||
<TableComponent
|
||||
suppressRowClickSelection={true}
|
||||
domLayout="autoHeight"
|
||||
pagination={false}
|
||||
columnDefs={colDefs}
|
||||
rowData={nodesRowData}
|
||||
onCellDoubleClicked={(e) => {
|
||||
setSelectedRows([e.data.name]);
|
||||
setOpen(true);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ export function extractColumnsFromRows(
|
|||
function intersection() {
|
||||
for (const key in rows[0]) {
|
||||
columnsKeys[key] = {
|
||||
headerName: toTitleCase(key),
|
||||
headerName: key,
|
||||
field: key,
|
||||
cellRenderer: TableAutoCellRender,
|
||||
filter: true,
|
||||
|
|
@ -382,7 +382,7 @@ export function extractColumnsFromRows(
|
|||
for (const row of rows) {
|
||||
for (const key in row) {
|
||||
columnsKeys[key] = {
|
||||
headerName: toTitleCase(key),
|
||||
headerName: key,
|
||||
field: key,
|
||||
filter: true,
|
||||
cellRenderer: TableAutoCellRender,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue