Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 76318c6

Browse files
authored
Merge pull request #942 from ghiscoding/chore/bindable
chore: use correct binding syntax
2 parents 070a187 + 87ec3b3 commit 76318c6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/app/examples/grid-tree-data-parent-child.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ <h2>
4646
</button>
4747
<button (click)="reapplyToggledItems()" data-test="reapply-toggled-items-btn"
4848
class="btn btn-outline-secondary btn-sm"
49-
disabled.bind="hasNoExpandCollapseChanged">
49+
[disabled]="hasNoExpandCollapseChanged">
5050
<span class="mdi mdi-history"></span>
5151
<span>Reapply Previous Toggled Items</span>
5252
</button>
53-
<div class.bind="loadingClass"></div>
53+
<div [class]="loadingClass"></div>
5454
</div>
5555
</div>
5656

src/app/examples/grid-tree-data-parent-child.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
1+
import { ChangeDetectorRef, Component, OnInit, ViewEncapsulation } from '@angular/core';
22
import { ExcelExportService } from '@slickgrid-universal/excel-export';
33

44
import {
@@ -49,7 +49,7 @@ export class GridTreeDataParentChildComponent implements OnInit {
4949
hasNoExpandCollapseChanged = true;
5050
treeToggleItems: TreeToggledItem[] = [];
5151

52-
constructor() { }
52+
constructor(private cdref: ChangeDetectorRef) { }
5353

5454
ngOnInit(): void {
5555
// define the grid options & columns and then create the grid itself
@@ -313,12 +313,14 @@ export class GridTreeDataParentChildComponent implements OnInit {
313313
/** Whenever a parent is being toggled, we'll keep a reference of all of these changes so that we can reapply them whenever we want */
314314
handleOnTreeItemToggled(treeToggleExecution: TreeToggleStateChange) {
315315
this.hasNoExpandCollapseChanged = false;
316+
this.cdref.detectChanges();
316317
this.treeToggleItems = treeToggleExecution.toggledItems as TreeToggledItem[];
317318
console.log('Tree Data changes', treeToggleExecution);
318319
}
319320

320321
handleOnGridStateChanged(gridStateChange: GridStateChange) {
321322
this.hasNoExpandCollapseChanged = false;
323+
this.cdref.detectChanges();
322324

323325
if (gridStateChange?.change?.type === GridStateType.treeData) {
324326
console.log('Tree Data gridStateChange', gridStateChange?.gridState?.treeData);

src/app/modules/angular-slickgrid/components/__tests__/angular-slickgrid.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ describe('Angular-Slickgrid Custom Component instantiated via Constructor', () =
323323
</div>
324324
</div>
325325
<angular-slickgrid
326-
grid-id="grid1"
327-
column-definitions.bind="columnDefinitions"
328-
grid-options.bind="gridOptions"
329-
dataset.bind="dataset">
326+
gridId="grid1"
327+
[columnDefinitions]="columnDefinitions"
328+
[gridOptions]="gridOptions"
329+
[dataset]="dataset">
330330
</angular-slickgrid>`;
331331

332332
beforeEach(async () => {

0 commit comments

Comments
 (0)