Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / CellMenuOptions

Interface: CellMenuOptions

Defined in: datagrid-react/src/types.ts:134

Which of the grid's own entries the cell context menu offers.

Every flag defaults to ON, so cellMenu is a way to REMOVE things rather than a list to opt into — a grid that ships without saying anything gets the clipboard and export entries a user expects from a spreadsheet.

Entries the grid cannot honour are not rendered rather than rendered disabled: an Export submenu on a grid whose optional export peers are absent would be a menu of dead ends. The exception is a permission the user could satisfy by acting — "Paste" stays visible while a cell is read-only, because the way out is to focus a different cell.

Properties

copy?

optional copy?: boolean

Defined in: datagrid-react/src/types.ts:136

Copy the selected cells, or the selected rows when there is no range.


copyWithGroupHeaders?

optional copyWithGroupHeaders?: boolean

Defined in: datagrid-react/src/types.ts:143

Copy with the BAND caption rows above the header line. Hidden on a grid with no bands, where it would produce exactly copyWithHeaders.


copyWithHeaders?

optional copyWithHeaders?: boolean

Defined in: datagrid-react/src/types.ts:138

Copy with a column-header line above the values.


export?

optional export?: boolean | ExportKind[]

Defined in: datagrid-react/src/types.ts:152

Export submenu. true offers every format the grid can write; an array picks which, in the order given.

Excel and PDF ride on OPTIONAL peers (exceljs, jspdf), so the default is CSV only — the one format that needs nothing installed. An app that installed the peers opts into them by naming them.