swluken / TouchTreeGrid

Sencha Touch Tree Grid, Basic Grid and Accordion Component with Examples
52 stars 20 forks source link

How to get neighboring cells #6

Closed jllodra closed 3 years ago

jllodra commented 7 years ago

Hi Steve,

I'd like to ask you for a method to get neighboring cells. Let me explain better:

When a cell is tapped, I highlight it adding a custom class .touchtreegrid-simplelist-cell-active to it. Then I have arrow buttons (up/down/left/right) to navigate between cells.

When I tap a button, I would love to know how you would unmark (remove the active class) the current selected cell, and highlight the adjacent one. My main problem is that I don't know how to access the DOM element of the adjacent cell.

Thank you