Fixed an issue where the result grid was not working properly while trying to edit data by hitting Enter key. #5463

pull/5523/head
Pravesh Sharma 2022-11-10 16:49:41 +05:30 committed by GitHub
parent e770065277
commit c8666f0029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -79,13 +79,13 @@ function CustomRow(props) {
}
};
if(!props.isRowSelected && props.selectedCellIdx > 0) {
dataGridExtras.onSelectedCellChange?.([props.row, props.viewportColumns?.[props.selectedCellIdx]]);
dataGridExtras.onSelectedCellChange?.([props.row, props.viewportColumns?.find(columns => columns.idx === props.selectedCellIdx)]);
} else if(props.selectedCellIdx == 0) {
dataGridExtras.onSelectedCellChange?.(null);
}
const openEditorOnEnter = (e)=>{
if(e.code === 'Enter' && !props.isRowSelected && props.selectedCellIdx > 0) {
props.selectCell(props.row, props.viewportColumns?.[props.selectedCellIdx], true);
props.selectCell(props.row, props.viewportColumns?.find(columns => columns.idx === props.selectedCellIdx), true);
}
};
return (