Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / GridToolbarProps

Interface: GridToolbarProps<TRow>

Defined in: datagrid-react/src/components/GridToolbar.tsx:16

Type Parameters

TRow

TRow = GridRowData

Properties

columnChooser?

optional columnChooser?: boolean

Defined in: datagrid-react/src/components/GridToolbar.tsx:27


controller

controller: DataGridController<TRow>

Defined in: datagrid-react/src/components/GridToolbar.tsx:17


dark?

optional dark?: boolean

Defined in: datagrid-react/src/components/GridToolbar.tsx:28


exportCsv?

optional exportCsv?: boolean

Defined in: datagrid-react/src/components/GridToolbar.tsx:19


exportExcel?

optional exportExcel?: boolean

Defined in: datagrid-react/src/components/GridToolbar.tsx:20


exportPdf?

optional exportPdf?: boolean

Defined in: datagrid-react/src/components/GridToolbar.tsx:26

Offer PDF. Off by default for the same reason Excel is: jspdf and jspdf-autotable are OPTIONAL peers, so a menu entry that is always there would fail on a grid that never installed them.


itemsAfter?

optional itemsAfter?: ReactNode

Defined in: datagrid-react/src/components/GridToolbar.tsx:44


itemsBefore?

optional itemsBefore?: ReactNode

Defined in: datagrid-react/src/components/GridToolbar.tsx:43

Extra controls. before sits ahead of the built-ins, after behind them — the spacer between search and the buttons keeps the two groups apart.

Nodes rather than a descriptor object: a toolbar item is arbitrary UI (a date range, a saved-view picker, a refresh button wired to the app's own store), and every descriptor schema ends up chasing the next widget.


labels?

optional labels?: Partial<Record<"exporting" | "search" | "csv" | "excel" | "excelSelected" | "pdf" | "columns" | "exportMenu", string>>

Defined in: datagrid-react/src/components/GridToolbar.tsx:47


onOpenColumnChooser?

optional onOpenColumnChooser?: (anchor) => void

Defined in: datagrid-react/src/components/GridToolbar.tsx:34

Opens the field chooser anchored under the button. The panel itself is owned by the grid, because the header menu can open it in a grid that renders no toolbar.

Parameters

anchor
left

number

top

number

Returns

void


search?

optional search?: boolean

Defined in: datagrid-react/src/components/GridToolbar.tsx:18


searchDebounce?

optional searchDebounce?: number

Defined in: datagrid-react/src/components/GridToolbar.tsx:46

Milliseconds to wait after the last keystroke. Default 200.