@@ -7,7 +7,7 @@ import { IDragAndDropData } from '../../dnd.js';
7
7
import { IIdentityProvider , IKeyboardNavigationLabelProvider , IListDragAndDrop , IListDragOverReaction , IListVirtualDelegate } from '../list/list.js' ;
8
8
import { ElementsDragAndDropData , ListViewTargetSector } from '../list/listView.js' ;
9
9
import { IListStyles } from '../list/listWidget.js' ;
10
- import { ComposedTreeDelegate , TreeFindMode as TreeFindMode , IAbstractTreeOptions , IAbstractTreeOptionsUpdate , TreeFindMatchType , AbstractTreePart , LabelFuzzyScore , FindFilter , FindController , ITreeFindToggleChangeEvent } from './abstractTree.js' ;
10
+ import { ComposedTreeDelegate , TreeFindMode as TreeFindMode , IAbstractTreeOptions , IAbstractTreeOptionsUpdate , TreeFindMatchType , AbstractTreePart , LabelFuzzyScore , FindFilter , FindController , ITreeFindToggleChangeEvent , IFindControllerOptions } from './abstractTree.js' ;
11
11
import { ICompressedTreeElement , ICompressedTreeNode } from './compressedObjectTreeModel.js' ;
12
12
import { getVisibleState , isFilterResult } from './indexTreeModel.js' ;
13
13
import { CompressibleObjectTree , ICompressibleKeyboardNavigationLabelProvider , ICompressibleObjectTreeOptions , ICompressibleTreeRenderer , IObjectTreeOptions , IObjectTreeSetChildrenOptions , ObjectTree } from './objectTree.js' ;
@@ -629,7 +629,12 @@ export class AsyncDataTree<TInput, T, TFilterData = void> implements IDisposable
629
629
this . tree . onDidChangeCollapseState ( this . _onDidChangeCollapseState , this , this . disposables ) ;
630
630
631
631
if ( asyncFindEnabled ) {
632
- const findOptions = { styles : options . findWidgetStyles , showNotFoundMessage : options . showNotFoundMessage } ;
632
+ const findOptions : IFindControllerOptions = {
633
+ styles : options . findWidgetStyles ,
634
+ showNotFoundMessage : options . showNotFoundMessage ,
635
+ defaultFindMatchType : options . defaultFindMatchType ,
636
+ defaultFindMode : options . defaultFindMode ,
637
+ } ;
633
638
this . findController = this . disposables . add ( new AsyncFindController ( this . tree , options . findProvider ! , findFilter ! , this . tree . options . contextViewProvider ! , findOptions ) ) ;
634
639
635
640
this . focusNavigationFilter = node => this . findController ! . shouldFocusWhenNavigating ( node ) ;
@@ -657,8 +662,18 @@ export class AsyncDataTree<TInput, T, TFilterData = void> implements IDisposable
657
662
return new ObjectTree ( user , container , objectTreeDelegate , objectTreeRenderers , objectTreeOptions ) ;
658
663
}
659
664
660
- updateOptions ( options : IAsyncDataTreeOptionsUpdate = { } ) : void {
661
- this . tree . updateOptions ( options ) ;
665
+ updateOptions ( optionsUpdate : IAsyncDataTreeOptionsUpdate = { } ) : void {
666
+ if ( this . findController ) {
667
+ if ( optionsUpdate . defaultFindMode !== undefined ) {
668
+ this . findController . mode = optionsUpdate . defaultFindMode ;
669
+ }
670
+
671
+ if ( optionsUpdate . defaultFindMatchType !== undefined ) {
672
+ this . findController . matchType = optionsUpdate . defaultFindMatchType ;
673
+ }
674
+ }
675
+
676
+ this . tree . updateOptions ( optionsUpdate ) ;
662
677
}
663
678
664
679
get options ( ) : IAsyncDataTreeOptions < T , TFilterData > {
@@ -1513,10 +1528,6 @@ export class CompressibleAsyncDataTree<TInput, T, TFilterData = void> extends As
1513
1528
} ;
1514
1529
}
1515
1530
1516
- override updateOptions ( options : ICompressibleAsyncDataTreeOptionsUpdate = { } ) : void {
1517
- this . tree . updateOptions ( options ) ;
1518
- }
1519
-
1520
1531
override getViewState ( ) : IAsyncDataTreeViewState {
1521
1532
if ( ! this . identityProvider ) {
1522
1533
throw new TreeError ( this . user , 'Can\'t get tree view state without an identity provider' ) ;
0 commit comments