Skip to content

EditableCell ^1.0.0 Beta

EditableCell is a built-in editable cell component. Double-click a cell to enter edit mode, with keyboard support for saving or canceling.

Basic Usage

Create an EditableCell component via the createEditableCell factory function and use it as customCell.

loading

Configuration Options

createEditableCell accepts a configuration object:

ts
interface CreateEditableCellOptions {
    /** Event that triggers editing, default 'dblclick' */
    trigger?: 'dblclick' | 'click';
    /** Value change callback */
    onChange?: (newValue: any, row: Record<string, any>, dataIndex: string) => void;
}
PropertyTypeDefaultDescription
trigger'dblclick' | 'click''dblclick'Event type that triggers editing
onChange(newValue, row, dataIndex) => void-Callback after editing is complete

Keyboard Shortcuts

The following keyboard shortcuts are supported in edit mode:

KeyBehavior
EnterSave and exit edit mode
EscapeCancel editing, restore original value
TabSave and exit edit mode
Arrow keysMove cursor within input (does not trigger cell navigation)

Released under the MIT License