Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onKeyDown gives colum index 1 instead of 0 #938

Open
50kudos opened this issue Apr 8, 2024 · 0 comments · May be fixed by #964
Open

onKeyDown gives colum index 1 instead of 0 #938

50kudos opened this issue Apr 8, 2024 · 0 comments · May be fixed by #964

Comments

@50kudos
Copy link

50kudos commented Apr 8, 2024

Issue:

When clicking a row 1 column 1 cell (data cell, not header nor. rowmaker column), the index of column is not updating to 0. So when press a keydown, it gives back column index = 1.

onKeyDown={e => {
  const [coldix, rowidx] = e.location
  // coldix == 1
}}

I suspect it is handleMaybeClick on /node_modules/@glideapps/glide-data-grid/src/data-editor/data-editor.tsx, in the if (isValidClick) block it should setGridSelection to expectedExternalGridSelection.

Can you confirm this is a bug, or it is expected?
Thank you for your great library.

@BrianHung BrianHung linked a pull request Jun 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant