Fixed size and pagination of globalVariables table

This commit is contained in:
Lucas Oliveira 2024-05-06 18:45:13 +01:00
commit 9172dbc895
3 changed files with 13 additions and 9 deletions

View file

@ -9,14 +9,14 @@ import { cn } from "../../utils/utils";
const TableComponent = forwardRef<
ElementRef<typeof AgGridReact>,
ComponentPropsWithoutRef<typeof AgGridReact>
>(({ pagination = true, ...props }, ref) => {
>(({ ...props }, ref) => {
const dark = useDarkStore((state) => state.dark);
return (
<div
className={cn(
dark ? "ag-theme-quartz-dark" : "ag-theme-quartz",
"ag-theme-shadcn flex h-full min-h-2 flex-col",
"ag-theme-shadcn flex h-full flex-col",
)} // applying the grid theme
>
<AgGridReact ref={ref} {...props} />

View file

@ -181,7 +181,6 @@ export default function GlobalVariablesPage() {
}}
rowSelection="multiple"
suppressRowClickSelection={true}
domLayout="autoHeight"
pagination={true}
columnDefs={colDefs}
rowData={rowData}

View file

@ -2,6 +2,7 @@ import { ColDef, ColGroupDef } from "ag-grid-community";
import { useState } from "react";
import ForwardedIconComponent from "../../../../components/genericIconComponent";
import TableComponent from "../../../../components/tableComponent";
import { Card, CardContent } from "../../../../components/ui/card";
export default function ShortcutsPage() {
const advancedShortcut = "Ctrl + Shift + A";
@ -95,12 +96,16 @@ export default function ShortcutsPage() {
</div>
</div>
<div className="grid gap-6 pb-8">
<TableComponent
domLayout="autoHeight"
pagination={false}
columnDefs={colDefs}
rowData={nodesRowData}
/>
<Card x-chunk="dashboard-04-chunk-2" className="h-full pt-4">
<CardContent className="h-full">
<TableComponent
domLayout="autoHeight"
pagination={false}
columnDefs={colDefs}
rowData={nodesRowData}
/>
</CardContent>
</Card>
</div>
</div>
);