Skip to content

Commit

Permalink
Commit changes before exiting grid (#2224)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanmahajan7 authored Nov 11, 2020
1 parent beb3c33 commit f417b57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ function DataGrid<R, SR>({
if (key === 'Tab') {
// If we are in a position to leave the grid, stop editing but stay in that cell
if (canExitGrid({ shiftKey, cellNavigationMode, columns, rowsCount: rows.length, selectedPosition })) {
commitEditorChanges();
// Allow focus to leave the grid so the next control in the tab order can be focused
return;
}
Expand Down

0 comments on commit f417b57

Please sign in to comment.