Skip to content

onKeyDown gives colum index 1 instead of 0 #938

@50kudos

Description

@50kudos

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @50kudos

      Issue actions

        `onKeyDown` gives colum index 1 instead of 0 · Issue #938 · glideapps/glide-data-grid