@kanunilabs/datagrid-enterprise
@kanunilabs/datagrid-enterprise / DateEditorSpec
Interface: DateEditorSpec
Properties
ariaLabel?
optionalariaLabel?:string
autoFocus?
optionalautoFocus?:boolean
columnId?
optionalcolumnId?:string
disabled?
optionaldisabled?:boolean
format?
optionalformat?:string
Column format. Defaults to yyyy-MM-dd.
invalid?
optionalinvalid?:boolean
onCancel
onCancel: () =>
void
Returns
void
onChange
onChange: (
value) =>void
Commit shape follows the value the editor was GIVEN: a Date column gets a Date back, an ISO-string column gets a string.
Parameters
value
unknown
Returns
void
onCommit
onCommit: () =>
void
Returns
void
onPortalOpen?
optionalonPortalOpen?: (close) =>void
Called when the editor opens a layer on document.body (the lookup list,
the date calendar), handing back the function that closes it again.
The layer outlives its cell by design — it is portalled so the grid's
scroller cannot clip it — which means removing the grid's DOM does not
remove it. Without this the layer stayed on screen after
grid.destroy(), hanging over whatever the app rendered next, until the
next scroll or resize let place() notice the input was gone.
The editing layer keeps the closer and calls it on dispose. Scoped per grid on purpose: a global registry would let one grid's teardown close another grid's open dropdown.
Parameters
close
() => void
Returns
void
onTab?
optionalonTab?: (shiftKey) =>void
Parameters
shiftKey
boolean
Returns
void
surfaceClass?
optionalsurfaceClass?:string
The portal's surface classes, so the calendar resolves --dg tokens.
t
t:
GridDictionary
testId?
optionaltestId?:string
value
value:
unknown