Skip to content

Commit

Permalink
fix onKeyDown rowMarkerOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHung committed Jun 11, 2024
1 parent 5983dca commit c429f7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"@storybook/react": "^7.6.12",
"@storybook/react-vite": "^7.6.12",
"@storybook/react-webpack5": "^7.6.12",
"@testing-library/react": "^12.1.2",
"@testing-library/dom": "^10.1.0",
"@testing-library/react": "^16.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.5.1",
"@types/cheerio": "^0.22.30",
Expand Down Expand Up @@ -85,11 +86,12 @@
"marked": "^4.0.10",
"mini-css-extract-plugin": "^2.6.1",
"prettier": "^3.0.2",
"react": "^16.12.0 || 17.x",
"react-dom": "^16.12.0 || 17.x",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-laag": "^2.0.3",
"react-responsive-carousel": "^3.2.7",
"react-syntax-highlighter": "^15.4.5",
"react-test-renderer": "^18.3.1",
"resolve-typescript-plugin": "^2.0.1",
"storybook": "^7.6.12",
"tsc-esm-fix": "^2.7.8",
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/data-editor/data-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3321,7 +3321,10 @@ const DataEditorImpl: React.ForwardRefRenderFunction<DataEditorRef, DataEditorPr
let cancelled = false;
if (onKeyDownIn !== undefined) {
onKeyDownIn({
...event,
...event, // FIXME: Mutate
...event.location && {
location: [event.location[0] - rowMarkerOffset, event.location[1]] as any,
},
cancel: () => {
cancelled = true;
},
Expand Down
2 changes: 1 addition & 1 deletion setup-react-18-test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

npm i -D react@latest react-dom@latest @testing-library/react@latest @testing-library/react-hooks@latest @testing-library/[email protected] react-test-renderer@latest
npm i -D react@latest react-dom@latest @testing-library/react@latest @testing-library/react-hooks@latest @testing-library/[email protected] react-test-renderer@latest @testing-library/dom

0 comments on commit c429f7b

Please sign in to comment.