This repository was archived by the owner on Jun 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/app/modules/angular-slickgrid/services Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -686,7 +686,9 @@ export class FilterService {
686686 } ) ;
687687
688688 // when we have a Filter Presets on a Tree Data View grid, we need to call the pre-filtering of tree data
689- this . refreshTreeDataFilters ( ) ;
689+ if ( this . _gridOptions ?. enableTreeData ) {
690+ this . refreshTreeDataFilters ( ) ;
691+ }
690692 }
691693 return this . _columnDefinitions ;
692694 }
@@ -697,7 +699,7 @@ export class FilterService {
697699 * @param {Array<Object> } [items] - optional flat array of parent/child items to use while redoing the full sort & refresh
698700 */
699701 refreshTreeDataFilters ( items ?: any [ ] ) {
700- const inputItems = items ?? this . _dataView . getItems ( ) ?? [ ] ;
702+ const inputItems = items ?? this . _dataView ? .getItems ?. ( ) ?? [ ] ;
701703
702704 if ( this . _dataView && this . _gridOptions ?. enableTreeData && inputItems . length > 0 ) {
703705 this . _tmpPreFilteredData = this . preFilterTreeData ( inputItems , this . _columnFilters ) ;
@@ -874,7 +876,9 @@ export class FilterService {
874876 } ) ;
875877
876878 // when using Tree Data, we also need to refresh the filters because of the tree structure with recursion
877- this . refreshTreeDataFilters ( ) ;
879+ if ( this . _gridOptions ?. enableTreeData ) {
880+ this . refreshTreeDataFilters ( ) ;
881+ }
878882
879883 this . _dataView . refresh ( ) ;
880884 }
You can’t perform that action at this time.
0 commit comments