feat: 🎸 check all filtered rows

When datatable has filters applied, and the "check all" is used, it will
check only the rows that match the filters.
This commit is contained in:
Julio de Alba 2022-09-22 07:07:20 -05:00
parent eda1540f3b
commit aa3f3be67f

View File

@ -113,7 +113,13 @@ export default class RowManager {
// update internal map
if (toggle) {
this.checkMap = Array.from(Array(this.getTotalRows())).map(c => value);
if (this.datamanager._filteredRows) {
this.datamanager._filteredRows.forEach(f => {
this.checkRow(f, toggle);
});
} else {
this.checkMap = Array.from(Array(this.getTotalRows())).map(c => value);
}
} else {
this.checkMap = [];
}