Skip to content

Commit 80afc51

Browse files
committed
Fixed state persistence sample- checking & unchecking options
1 parent 234c412 commit 80afc51

File tree

1 file changed

+6
-5
lines changed
  • samples/grids/pivot-grid/state-persistence-main/src

1 file changed

+6
-5
lines changed

samples/grids/pivot-grid/state-persistence-main/src/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class Sample {
2121

2222
public options: IgcGridStateOptions = {
2323
cellSelection: true,
24-
rowSelection: true,
24+
columnSelection: true,
2525
filtering: true,
2626
sorting: true,
2727
expansion: true,
@@ -245,13 +245,14 @@ export class Sample {
245245
if (action === 'allFeatures') {
246246
var allCheckboxes = Array.from(document.getElementsByTagName("igc-checkbox"));
247247
allCheckboxes.forEach(cb => {
248-
cb.checked = event.detail;
248+
cb.checked = event.detail.checked;
249249
});
250+
250251
for (const key of Object.keys(this.options)) {
251-
(this.gridState.options as any)[key] = event.detail;
252-
}
252+
(this.gridState.options as any)[key] = event.detail.checked;
253+
}
253254
} else {
254-
(this.gridState.options as any)[action] = event.detail;
255+
(this.gridState.options as any)[action] = event.detail.checked;
255256
var allFeatures = document.getElementById("allFeatures") as IgcCheckboxComponent;
256257
allFeatures.checked = Object.keys(this.options).every(o => (this.gridState.options as any)[o]);
257258
}

0 commit comments

Comments
 (0)