AvaloniaUI / Avalonia.Controls.TreeDataGrid

A combined TreeView/DataGrid for Avalonia.
MIT License
233 stars 48 forks source link

Row Focus Order Does Not Match Visible Order #262

Open xLEGiON opened 4 months ago

xLEGiON commented 4 months ago

The Tab key can be used to change the focused cell. If the final cell of a row is focused, the focus will move to the next row.

If the TreeDataGrid contains enough rows to be scrolled and the user scrolls up/down, or if the source collection is modified (e.g. items being inserted), using Tab to change the focus to the next row will often make the focus switch to a seemingly random row instead of the next row visible to the user.

After inspecting the visual children of the TreeDataGridRowsPresenter during runtime, the focus order of the rows seems to match the order these rows appear in the AvaloniaList<Visual>, which won't always match the order the user sees the rows.

The expected behavior is that the row focus order matches the visible order.

Environment: TreeDataGrid Version: 11.0.2 Avalonia Version: 11.0.6 Operating System: Windows 10

xLEGiON commented 3 months ago

Adding a video to see the issue more clearly:

Row Focus Issue.webm