fix: KsDataGrid - add retry logic for Enter key edit mode

- Use multiple setTimeout attempts after tabToNextCell
- Ensures next cell enters edit mode reliably
- Matches focusRow() reliability pattern
This commit is contained in:
2026-08-16 21:26:14 +09:00
parent 43e239d5e4
commit 16522855a6
@@ -118,12 +118,16 @@ function onCellKeyDown(event: any): void {
event.api.stopEditing(false) event.api.stopEditing(false)
event.api.tabToNextCell(false) event.api.tabToNextCell(false)
setTimeout(() => { const ensureEditMode = () => {
const focusedCell = event.api.getFocusedCell() const focusedCell = event.api.getFocusedCell()
if (focusedCell && focusedCell.rowIndex !== null) { if (focusedCell) {
event.api.startEditingCell({ rowIndex: focusedCell.rowIndex, colKey: focusedCell.column.getColId() }) event.api.startEditingCell(focusedCell)
} }
}, 0) }
ensureEditMode()
setTimeout(ensureEditMode, 10)
setTimeout(ensureEditMode, 50)
} }
} }