Skip to content

Commit

Permalink
fix: columnlist remove
Browse files Browse the repository at this point in the history
  • Loading branch information
giard-alexandre committed Sep 28, 2024
1 parent f87cbe6 commit 44a7afe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/DynamicTreeDataGrid/Models/Columns/DynamicColumnListBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ protected override void SetItem(int index, IDynamicColumn<TModel> item) {
base.SetItem(index, item);
}

protected override void ClearItems() {
base.ClearItems();
_nameSet.Clear();
}

protected override void RemoveItem(int index) {
var removedName = this[index].Name;
_nameSet.Remove(removedName);
base.RemoveItem(index);
}

public Size CellMeasured(int columnIndex, int rowIndex, Size size) {
var column = (IUpdateColumnLayout)this[columnIndex];
return new Size(column.CellMeasured(size.Width, rowIndex), size.Height);
Expand Down

0 comments on commit 44a7afe

Please sign in to comment.