@@ -359,6 +359,7 @@ class TypeFilterController<T, TFilterData> implements IDisposable {
359359
360360 constructor (
361361 private tree : AbstractTree < T , TFilterData , any > ,
362+ model : ITreeModel < T , TFilterData , any > ,
362363 private view : List < ITreeNode < T , TFilterData > > ,
363364 private filter : TypeFilter < T > ,
364365 private keyboardNavigationLabelProvider : IKeyboardNavigationLabelProvider < T >
@@ -383,6 +384,8 @@ class TypeFilterController<T, TFilterData> implements IDisposable {
383384 this . clearDomNode . tabIndex = - 1 ;
384385 this . clearDomNode . title = localize ( 'clear' , "Clear" ) ;
385386
387+ model . onDidSplice ( this . onDidSpliceModel , this , this . disposables ) ;
388+
386389 tree . onDidUpdateOptions ( this . onDidUpdateTreeOptions , this , this . disposables ) ;
387390 this . onDidUpdateTreeOptions ( tree . options ) ;
388391 }
@@ -524,6 +527,11 @@ class TypeFilterController<T, TFilterData> implements IDisposable {
524527 disposables . push ( toDisposable ( ( ) => StaticDND . CurrentDragAndDropData = undefined ) ) ;
525528 }
526529
530+ private onDidSpliceModel ( ) : void {
531+ this . tree . refilter ( ) ;
532+ this . updateMessage ( ) ;
533+ }
534+
527535 private onDidChangeFilterOnType ( ) : void {
528536 this . tree . updateOptions ( { filterOnType : this . filterOnTypeDomNode . checked } ) ;
529537 this . tree . refilter ( ) ;
@@ -660,7 +668,7 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
660668 }
661669
662670 if ( _options . keyboardNavigationLabelProvider ) {
663- const typeFilterController = new TypeFilterController ( this , this . view , filter as TypeFilter < T > , _options . keyboardNavigationLabelProvider ) ;
671+ const typeFilterController = new TypeFilterController ( this , this . model , this . view , filter as TypeFilter < T > , _options . keyboardNavigationLabelProvider ) ;
664672 this . focusNavigationFilter = node => ! typeFilterController . pattern || ! FuzzyScore . isDefault ( node . filterData as any as FuzzyScore ) ; // TODO@joao
665673 this . disposables . push ( typeFilterController ) ;
666674 }
0 commit comments