@@ -4,10 +4,11 @@ import { IGX_GRID_DIRECTIVES, IgxActionStripComponent, IgxButtonDirective, IgxBu
44import { IgxAccordionComponent } from 'igniteui-angular/accordion' ;
55import { IGX_EXPANSION_PANEL_DIRECTIVES } from 'igniteui-angular/expansion-panel' ;
66import { IgxHierarchicalGridComponent , IgxRowIslandComponent } from 'igniteui-angular/grids/hierarchical-grid' ;
7+ import { IgxTreeGridComponent } from 'igniteui-angular/grids/tree-grid' ;
78import { IgxInputGroupComponent , IgxInputDirective } from 'igniteui-angular/input-group' ;
89import { IGX_SELECT_DIRECTIVES } from 'igniteui-angular/select' ;
910import { PropertyChangeService } from '../properties-panel/property-change.service' ;
10- import { SAMPLE_DATA } from '../shared/sample-data' ;
11+ import { HIERARCHICAL_SAMPLE_DATA , SAMPLE_DATA } from '../shared/sample-data' ;
1112import { BorderRuleEditorComponent } from './border-rule-editor.component' ;
1213import { BORDER_DEFAULTS , BorderSignals , BorderTarget } from './border-rule-editor.types' ;
1314import { ColorPickerComponent } from './color-picker.component' ;
@@ -26,7 +27,7 @@ class EmployeesSummary extends IgxNumberSummaryOperand {
2627 templateUrl : 'grid-theme-builder.sample.html' ,
2728 changeDetection : ChangeDetectionStrategy . OnPush ,
2829 encapsulation : ViewEncapsulation . None ,
29- imports : [ FormsModule , IGX_GRID_DIRECTIVES , IgxHierarchicalGridComponent , IgxRowIslandComponent , IgxActionStripComponent , IgxButtonDirective , IgxButtonGroupComponent , IgxAccordionComponent , IGX_EXPANSION_PANEL_DIRECTIVES , IGX_SELECT_DIRECTIVES , IgxInputGroupComponent , IgxInputDirective , ColorPickerComponent , BorderRuleEditorComponent ]
30+ imports : [ FormsModule , IGX_GRID_DIRECTIVES , IgxHierarchicalGridComponent , IgxRowIslandComponent , IgxTreeGridComponent , IgxActionStripComponent , IgxButtonDirective , IgxButtonGroupComponent , IgxAccordionComponent , IGX_EXPANSION_PANEL_DIRECTIVES , IGX_SELECT_DIRECTIVES , IgxInputGroupComponent , IgxInputDirective , ColorPickerComponent , BorderRuleEditorComponent ]
3031} )
3132export class GridThemeBuilderSampleComponent implements OnInit , AfterViewInit {
3233 protected readonly gridForeground = signal ( '' ) ;
@@ -91,10 +92,10 @@ export class GridThemeBuilderSampleComponent implements OnInit, AfterViewInit {
9192 private readonly sampleEl = viewChild . required < ElementRef > ( 'sampleEl' ) ;
9293 private readonly customControlsTemplate = viewChild . required < TemplateRef < any > > ( 'customControls' ) ;
9394
94- // Only one grid preview is mounted at a time: both a flat grid and a
95- // 4-level-deep hierarchical grid are expensive to initialize, and neither
96- // is needed while the other is what's actually being themed.
97- protected readonly activePreview = signal < 'grid' | 'hierarchical' > ( 'grid' ) ;
95+ // Only one grid preview is mounted at a time. The hierarchical preview is
96+ // expensive to initialize, and hidden grids aren't needed while another
97+ // grid type is being themed.
98+ protected readonly activePreview = signal < 'grid' | 'tree' | ' hierarchical'> ( 'grid' ) ;
9899
99100 protected readonly showExport = signal ( false ) ;
100101 protected readonly copiedExport = signal < 'css' | 'scss' | null > ( null ) ;
@@ -262,6 +263,7 @@ export class GridThemeBuilderSampleComponent implements OnInit, AfterViewInit {
262263 private readonly propertyChangeService = inject ( PropertyChangeService ) ;
263264
264265 public data : Array < any > ;
266+ public readonly treeData = HIERARCHICAL_SAMPLE_DATA ;
265267 public readonly hierarchicalData = this . generateHierarchicalData ( 10 , 3 ) ;
266268 public readonly employeesSummary = EmployeesSummary ;
267269
0 commit comments