Draggable grouping and check box selector are enabled. If we click the select all checkbox when the grid is grouped with some column(s), the sgOnSelectedRowsChanged() event is emitted multiple times until all the selected check-boxes become deselected. This happens within a fraction of a second, so that it appears that the select-all option does not work. But the single select check-box works fine.
This issue can be recreated in the draggable grouping slick-grid demo.
- enableCheckboxSelector: true in gridOptions.
- HTML
<angular-slickgrid gridId="grid19"
[dataset]="dataset"
[columnDefinitions]="columnDefinitions"
[gridOptions]="gridOptions"
(onAngularGridCreated)="angularGridReady($event)"
(sgOnSelectedRowsChanged)="SelectedRows($event, $event.detail.args)">
</angular-slickgrid>
- SelectedRows() in TS.
public selectedRows = [];
SelectedRows(e, args) {
console.log("args", args)
this.selectedRows = [];
if (Array.isArray(args.rows)) {
this.selectedRows = args.rows.map(res => {
const item = this.gridObj.getDataItem(res);
return item;
});
}
}