You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pull request #241 ported some fixes from AvaloniaUI/Avalonia#13795 to RealizedStackElements, including the new ItemsReplaced method. It also made use of this more efficient method in TreeDataGridPresenterBase when the items collection changed with a NotifyCollectionChangedAction.Replace action.
However, this made the assumption that the old and new items of the NotifyCollectionChangedEventArgs have the same length. When this is not true (e.g. replacing 2 items with 1 or 3 items), the TreeDataGrid does not display the collection change correctly. Before this change to TreeDataGridPresenterBase, the collection change was displayed correctly.
To fix this, it is still possible to use the more efficient ItemsReplaced method when the old and new items have the same length, but use the previous behavior when they do not. I've tested this idea and it fixes the issue. I will create a pull request with the proposed change.
Pull request #241 ported some fixes from AvaloniaUI/Avalonia#13795 to
RealizedStackElements
, including the newItemsReplaced
method. It also made use of this more efficient method inTreeDataGridPresenterBase
when the items collection changed with aNotifyCollectionChangedAction.Replace
action.However, this made the assumption that the old and new items of the
NotifyCollectionChangedEventArgs
have the same length. When this is not true (e.g. replacing 2 items with 1 or 3 items), the TreeDataGrid does not display the collection change correctly. Before this change toTreeDataGridPresenterBase
, the collection change was displayed correctly.To fix this, it is still possible to use the more efficient
ItemsReplaced
method when the old and new items have the same length, but use the previous behavior when they do not. I've tested this idea and it fixes the issue. I will create a pull request with the proposed change.Environment:
TreeDataGrid Version: 11.0.2
Avalonia Version: 11.0.6
Operating System: Windows 10
The text was updated successfully, but these errors were encountered: