@kanunilabs/datagrid-react / GridToolbarProps
Interface: GridToolbarProps<TRow>
Type Parameters
TRow
TRow = GridRowData
Properties
columnChooser?
optionalcolumnChooser?:boolean
controller
controller:
DataGridController<TRow>
dark?
optionaldark?:boolean
exportCsv?
optionalexportCsv?:boolean
exportExcel?
optionalexportExcel?:boolean
exportPdf?
optionalexportPdf?:boolean
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?
optionalitemsAfter?:ReactNode
itemsBefore?
optionalitemsBefore?:ReactNode
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?
optionallabels?:Partial<Record<"exporting"|"search"|"csv"|"excel"|"excelSelected"|"pdf"|"columns"|"exportMenu",string>>
onOpenColumnChooser?
optionalonOpenColumnChooser?: (anchor) =>void
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?
optionalsearch?:boolean
searchDebounce?
optionalsearchDebounce?:number
Milliseconds to wait after the last keystroke. Default 200.