diff --git a/samples/grids/pivot-grid/state-persistence-main/src/index.ts b/samples/grids/pivot-grid/state-persistence-main/src/index.ts index 86f4132afb..f5444f0607 100644 --- a/samples/grids/pivot-grid/state-persistence-main/src/index.ts +++ b/samples/grids/pivot-grid/state-persistence-main/src/index.ts @@ -21,7 +21,7 @@ export class Sample { public options: IgcGridStateOptions = { cellSelection: true, - rowSelection: true, + columnSelection: true, filtering: true, sorting: true, expansion: true, @@ -245,13 +245,14 @@ export class Sample { if (action === 'allFeatures') { var allCheckboxes = Array.from(document.getElementsByTagName("igc-checkbox")); allCheckboxes.forEach(cb => { - cb.checked = event.detail; + cb.checked = event.detail.checked; }); + for (const key of Object.keys(this.options)) { - (this.gridState.options as any)[key] = event.detail; - } + (this.gridState.options as any)[key] = event.detail.checked; + } } else { - (this.gridState.options as any)[action] = event.detail; + (this.gridState.options as any)[action] = event.detail.checked; var allFeatures = document.getElementById("allFeatures") as IgcCheckboxComponent; allFeatures.checked = Object.keys(this.options).every(o => (this.gridState.options as any)[o]); }