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.
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, insteadRecycleElementOnItemRemoved
should be called.Add
TreeDataGridPresenterBase.UnrealizeOnRowRemoved
(with an override inTreeDataGridRowsPresenter
) and makeTreeDataGridPresenterBase.RecycleElementOnItemRemoved
call it.Fixes #210