@omnigrid/selection-plugin 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -333,6 +333,8 @@ export class SelectionPlugin {
|
|
|
333
333
|
stopRowClick: true,
|
|
334
334
|
// The checkbox column must always stay pinned to the left.
|
|
335
335
|
pinned: "left",
|
|
336
|
+
movable: false,
|
|
337
|
+
lockPosition: "start",
|
|
336
338
|
headerRenderer: () => this.renderCheckbox({
|
|
337
339
|
checked: this.isAllSelectableRowsSelected(),
|
|
338
340
|
indeterminate: this.hasSomeSelectableRowsSelected() && !this.isAllSelectableRowsSelected(),
|
|
@@ -435,11 +437,15 @@ export class SelectionPlugin {
|
|
|
435
437
|
if (!this.api)
|
|
436
438
|
return;
|
|
437
439
|
const processedData = this.api.getProcessedData();
|
|
440
|
+
const validIds = new Set();
|
|
441
|
+
for (let i = 0; i < processedData.length; i += 1) {
|
|
442
|
+
const row = processedData[i];
|
|
443
|
+
if (this.isRowSelectable(row, i))
|
|
444
|
+
validIds.add(this.getSelectionRowId(row, i));
|
|
445
|
+
}
|
|
438
446
|
let hasChanges = false;
|
|
439
447
|
for (const rowId of this.selectedRowIds) {
|
|
440
|
-
|
|
441
|
-
const row = index !== -1 ? processedData[index] : undefined;
|
|
442
|
-
if (row && index !== -1 && !this.isRowSelectable(row, index)) {
|
|
448
|
+
if (!validIds.has(rowId)) {
|
|
443
449
|
this.selectedRowIds.delete(rowId);
|
|
444
450
|
hasChanges = true;
|
|
445
451
|
}
|