CellEditor
Description
The CellEditor handles user input during editing and handles native clipboard events when inactive.
Usage
Your DataGridXL instance contains a property cellEditor.
// create DataGridXL instance
const grid = new DataGridXL(...);
// work with the CellEditor instance
grid.cellEditor.open();
grid.cellEditor.events.on('input', ...);NOTE: You don't need to create a CellEditor instance yourself — it is provided by the grid automatically.Methods
close()Close cell editor
$closedisable()Disable cell editor
enable()Enable cell editor
getValue(): stringGet value of cell editor
stringValue inside cell editorisOpen(): booleanCheck if cell editor is open
booleanReturns `true` if cell editor is open, otherwise `false`.open(value?)Open cell editor When value is left out, the editor opens blank
Arguments
stringValue to place in cell editor$openprepare(cellCoords)Prepare cell editor Positions cell editor at cell coords and makes cell value copyable
Arguments
CellCoordsCell coordinatesresize()Resize cell editor to fit contents
setValue(value)Set cell editor value
Arguments
stringValue to place in cell editorEvents
closeCellEditorEventFires when cell editor closes
Payload
typestringtargetCellEditorcopyPassthroughEventFires when native `copy` event is triggered
Payload
typestringtargetobjectnativeEventEventcutPassthroughEventFires when native `cut` event is triggered
Payload
typestringtargetobjectnativeEventEventinputPassthroughEventFires when native `input` event is triggered
Payload
typestringtargetobjectnativeEventEventbeforeopenCellEditorOpenEventFires before the editor opens. You may modify `payload` to alter the behavior (e.g. editor positioning or contents). Returning `false` cancels the event.
Payload
typestringtargetCellEditorpayloadCellEditorOpenEventPayloadopenCellEditorOpenEventFires when the editor opens
Payload
typestringtargetCellEditorpayloadCellEditorOpenEventPayloadpastePassthroughEventFires when native `paste` event is triggered
Payload
typestringtargetobjectnativeEventEvent