Closed Unidraga closed 3 years ago
Bug confirmed, nice spot.
Whenever we navigate using tab from the AutocompleteCellEditor, seem that something has changed with latest ag-grid update.
Was one of the only behaviour I cannot test with Cypress (see here). I will check that whenever I have some time.
Not the best way to handle this, but this is the current workaround I am using.
// hack to restore focus to ag-grid when tab-ing out of cell
onCellValueChanged: (params: CellValueChangedEvent) => {
const focusedCell = params?.api?.getFocusedCell();
const focusedColID = focusedCell?.column?.getColId();
if (focusedCell && focusedColID !== params.column?.getColId()) {
params.api.startEditingCell({
colKey: focusedCell.column.getColId(),
rowIndex: focusedCell.rowIndex,
});
}
},
This behavior could now be tested with cypress-real-event
(related to) #93
Using the demo given, under the "Ajax country request" column.
When you type 'cana' and hit Tab key, it'll select 'Canada' and move over the right, which is the 'Capital slow request with spinner' column.
However, it is not in focus anymore and it doesn't take any input from the keyboard until you give it a mouse click.
The default behavior is that it should be editable.
Take 'Price' column for example, after you enter a value and hit Tab key, you will be able to enter 'cana'