glide-data-grid icon indicating copy to clipboard operation
glide-data-grid copied to clipboard

Switch to next row when using tab to go through cells

Open lukasmasuch opened this issue 1 year ago • 3 comments

If a user uses tab hotkey to go through all cells, I expect that it goes to the next row if it reaches the end of the first row. However, it does switch to the next selectable element on the page instead:

https://user-images.githubusercontent.com/2852129/222752434-6b023204-dd49-4be1-8bfa-3408b1aa2360.mov

lukasmasuch avatar Mar 03 '23 14:03 lukasmasuch

Wonder if onKeyDown can be used as a work-around for now. On second thought, this might be undefined behavior: since in my app, we prefer if tab creates a new column (like how enter can create a new row with trailingRow).

BrianHung avatar Mar 31 '23 23:03 BrianHung

I think what we need to do is add a callback for this event so that the user can decide what to do. In our app we actually want it to tab into the rightElement.

jassmith avatar Aug 25 '23 03:08 jassmith

For this I used the onFinishedEditingCallback. In it you get the movement and with the columns you can check if there is a cell on the right. If not, just set the gridselection to the next row.

Higgy831 avatar Aug 28 '23 19:08 Higgy831