Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / GridDateEditorProps

Interface: GridDateEditorProps

Properties

ariaLabel?

optional ariaLabel?: string


autoFocus?

optional autoFocus?: boolean

Take focus on mount. True for a cell editor, false in row mode where every editable cell mounts one at once.


columnId?

optional columnId?: string


disabled?

optional disabled?: boolean


format?

optional format?: string

Column format. Defaults to yyyy-MM-dd.


invalid?

optional invalid?: boolean


onBlurCommit?

optional onBlurCommit?: () => void

Focus left the box for somewhere that is not its calendar: commit (the cell editor's click-away, P-10). Left out (row mode, the form), a blur only settles the typed text, as before.

Returns

void


onCancel

onCancel: () => void

Returns

void


onChange

onChange: (value) => void

Commit shape follows the value the editor was GIVEN: a column holding Date objects gets a Date back, one holding ISO strings gets a string. Changing an app's storage shape on save is not the editor's business.

Parameters

value

unknown

Returns

void


onCommit

onCommit: () => void

Returns

void


onTab?

optional onTab?: (shiftKey) => void

Parameters

shiftKey

boolean

Returns

void


registerFlush?

optional registerFlush?: (flush) => void

The grid's setEditFlusher (B.12.5): a commit from elsewhere writes the typed (or cleared) day first.

Parameters

flush

(() => boolean) | null

Returns

void


seedDigits?

optional seedDigits?: string

Digits the box starts with — the editor was opened by typing one on the cell (P-3.6). The caret goes after them instead of selecting.


testId?

optional testId?: string


value

value: unknown