Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions samples/grids/pivot-grid/state-persistence-main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class Sample {

public options: IgcGridStateOptions = {
cellSelection: true,
rowSelection: true,
columnSelection: true,
filtering: true,
sorting: true,
expansion: true,
Expand Down Expand Up @@ -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]);
}
Expand Down
Loading