@linzjs/step-ag-grid 22.2.3 → 22.2.4
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/step-ag-grid.cjs.js
CHANGED
|
@@ -4491,7 +4491,14 @@ const BooleanCellRenderer = (props) => {
|
|
|
4491
4491
|
const params = props?.colDef?.cellEditorParams;
|
|
4492
4492
|
if (!params)
|
|
4493
4493
|
return;
|
|
4494
|
-
|
|
4494
|
+
// The data cannot be relied upon if grid changed whilst editing, data will be stale
|
|
4495
|
+
// So I get the data from the node itself which will be up to date.
|
|
4496
|
+
const selectedRows = [];
|
|
4497
|
+
api.forEachNode((n) => {
|
|
4498
|
+
if (n.data.id === data.id) {
|
|
4499
|
+
selectedRows.push(n.data);
|
|
4500
|
+
}
|
|
4501
|
+
});
|
|
4495
4502
|
const checked = !value;
|
|
4496
4503
|
onValueChange(checked);
|
|
4497
4504
|
params.onClick({ selectedRows, selectedRowIds: selectedRows.map((r) => r.id), checked }).then();
|