maxim-saplin / data_table_2

In-place substitute for Flutter's DataTable and PaginatedDataTable with fixed/sticky header and extra features
https://pub.dev/packages/data_table_2
BSD 3-Clause "New" or "Revised" License
202 stars 135 forks source link

Disable focus for cells without an onTap handler #287

Open jessimb opened 2 months ago

jessimb commented 2 months ago

We have a DataTable2 with DataRow2s made up of DataCells. The DataRow2 has an onTap handler. Only one of the cells has anything interactable (a button), the other cells are readonly text.

When i try to tab through the table, i have to hit tab on each cell before focus moves to the next row. Notably, the cells have no specific focus state, so I have to hit tab 4 times (for 3 cells) for anything visual to happen.

Ideally, focus would skip any cells that don't have interaction. So I would hit tab to go to the next row, tab again would go to the button (skipping the text), tab again to the next row and so on.

As it stands I'm not able to exclude focus for datacells, so I'm not sure how I can do this myself.