AvaloniaUI / Avalonia.Controls.TreeDataGrid

A combined TreeView/DataGrid for Avalonia.
MIT License
234 stars 49 forks source link

Call child realize from parent realize. #219

Closed grokys closed 9 months ago

grokys commented 9 months ago

Previously we were calling e.g. TreeDataGridCellsPresenter.UpdateRowIndex from TreeDataGridRow.Realize instead of TreeDataGridCellsPresenter.Realize. This was causing the cells presenter to be stuck in a half-realized state. Make sure we call child Realize on realize and parent UpdateRowIndex only when updating row index. Added checks to ensure that UpdateRowIndex can't be called on an unrealized row or cell.

I'm still unclear as to why this shows up only when switching tabs (on the sample app) and I've been unable to create a failing unit test for it so far, hence marking it as draft.

Fixes #218

grokys commented 9 months ago

Customer confirms this fixes the issue. Going to merge because I'm still unable to create a unit test :(