Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / EditKeys

Interface: EditKeys

Which gestures open a cell's editor (P-7.1). Every field defaults to today's behaviour: f2: true, enter: false, typing: true, doubleClick: true.

Properties

doubleClick?

optional doubleClick?: boolean

A double-click (a double-tap on a touch screen) opens the cell's editor. Default true.


enter?

optional enter?: boolean

Enter opens the focused cell's editor, and Enter (or Shift+Enter) in an open editor commits and STAYS on the cell instead of moving down. Enter never adds a row. On a cell that cannot be edited Enter stays onRowActivate. Default false: Enter is onRowActivate, and in an open editor commits and moves down.


f2?

optional f2?: boolean

F2 opens the focused cell's editor. Default true. false: the grid does not handle F2 at all and does not preventDefault() it — the key reaches the page (an app whose F2 means Save).


space?

optional space?: boolean

Space on a focused lookup cell opens its editor (and, with lookup.openOnEdit, its list) instead of doing nothing; the space is not typed into the box. While an editor is open Space types a space as usual. Default false (P-11).


typing?

optional typing?: boolean

Typing a printable character on a focused cell opens its editor with that character. Default true. Same as editOnKeyPress; this one wins when both are given.