Skip to content

CellActivateDetail

Fired when a cell is activated by user interaction (Enter key or click). Unified event for both keyboard and pointer activation.

grid.on('cell-activate', ({ row, field, value, trigger, cellEl }, event) => {
if (trigger === 'keyboard') {
console.log('Activated via Enter key');
} else {
console.log('Activated via click/tap');
}
// Start custom editing for specific columns
if (field === 'notes') {
event.preventDefault(); // Prevent default editing
openNotesEditor(row, cellEl);
}
});
PropertyTypeDescription
rowIndexnumberZero-based row index of the activated cell.
colIndexnumberZero-based column index of the activated cell.
fieldstringField name of the activated column.
valueunknownCell value at the activated position.
rowTRowFull row data object.
cellElHTMLElementThe activated cell element.
triggerCellActivateTriggerWhat triggered the activation.
originalEventMouseEvent | PointerEvent | KeyboardEventThe original event (KeyboardEvent for keyboard, MouseEvent/PointerEvent for pointer).
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt