@kanunilabs/datagrid-react / usePrintLayout
Function: usePrintLayout()
usePrintLayout<
TRow>(controller,options):PrintLayoutState
Defined in: datagrid-react/src/hooks/usePrintLayout.ts:95
Suspend virtualization while the browser is printing.
flushSync is not decoration here. beforeprint is the last moment the page
can be changed, and the browser snapshots it the instant the handler returns
— an ordinary setState would land after that and print the old, clipped
view. This is the case the API exists for.
Type Parameters
TRow
TRow = GridRowData
Parameters
controller
DataGridController<TRow>
options
boolean | PrintLayoutOptions | undefined