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:
@@ -118,12 +118,16 @@ function onCellKeyDown(event: any): void {
|
||||
event.api.stopEditing(false)
|
||||
event.api.tabToNextCell(false)
|
||||
|
||||
setTimeout(() => {
|
||||
const ensureEditMode = () => {
|
||||
const focusedCell = event.api.getFocusedCell()
|
||||
if (focusedCell && focusedCell.rowIndex !== null) {
|
||||
event.api.startEditingCell({ rowIndex: focusedCell.rowIndex, colKey: focusedCell.column.getColId() })
|
||||
if (focusedCell) {
|
||||
event.api.startEditingCell(focusedCell)
|
||||
}
|
||||
}, 0)
|
||||
}
|
||||
|
||||
ensureEditMode()
|
||||
setTimeout(ensureEditMode, 10)
|
||||
setTimeout(ensureEditMode, 50)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user