From 07fbe12844d772caa3745aecb9020731d45b83fb Mon Sep 17 00:00:00 2001 From: SaraMZoorob <149233477+SaraMZoorob@users.noreply.github.com> Date: Fri, 28 Jun 2024 20:40:01 +0300 Subject: [PATCH] fix: cannot read properties of undefined reading startsWith --- src/components/DataSheetGrid.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DataSheetGrid.tsx b/src/components/DataSheetGrid.tsx index cd3aa07..5c5bdd6 100644 --- a/src/components/DataSheetGrid.tsx +++ b/src/components/DataSheetGrid.tsx @@ -1359,7 +1359,7 @@ export const DataSheetGrid = React.memo( } } - if (event.key.startsWith('Arrow') || event.key === 'Tab') { + if (event.key?.startsWith('Arrow') || event.key === 'Tab') { if (editing && columns[activeCell.col + 1].disableKeys) { return }