AvaloniaUI / Avalonia.Controls.TreeDataGrid

A combined TreeView/DataGrid for Avalonia.
MIT License
266 stars 54 forks source link

Fix nodes appearing in wrong position #213

Closed grokys closed 1 year ago

grokys commented 1 year ago

Previously, a cell with focus wasn't being recycled when the parent row was removed as TreeDataGridPresenterBase.RecycleElement was being called on it, which has logic to keep the focused element around. This makes no sense when the containing row has been removed, instead RecycleElementOnItemRemoved should be called.

Add TreeDataGridPresenterBase.UnrealizeOnRowRemoved (with an override in TreeDataGridRowsPresenter) and make TreeDataGridPresenterBase.RecycleElementOnItemRemoved call it.

Fixes #210