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