Reset traits after switching model (#227956)

reset traits after switching model
This commit is contained in:
Benjamin Christopher Simmonds
2024-09-09 11:55:46 +02:00
committed by GitHub
parent 65e0b66786
commit 884cfb16a3
@@ -3144,6 +3144,10 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
this.renderers.forEach(r => r.setModel(newModel));
this.stickyScrollController?.setModel(newModel);
this.focus.set([]);
this.selection.set([]);
this.anchor.set([]);
this.view.splice(0, oldModel.getListRenderCount(oldModel.rootRef));
this.model.refilter();