@linzjs/step-ag-grid 22.2.1 → 22.2.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "22.2.1",
5
+ "version": "22.2.2",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -1,5 +1,4 @@
1
1
  import { CellClickedEvent } from "ag-grid-community";
2
- import { fnOrVar } from "../utils/util";
3
2
 
4
3
  /**
5
4
  * AgGrid checkbox select does not pass clicks within cell but not on the checkbox to checkbox.
@@ -9,13 +8,14 @@ export const clickInputWhenContainingCellClicked = (params: CellClickedEvent) =>
9
8
  const { data, event, colDef } = params;
10
9
  if (!data || !event) return;
11
10
 
12
- if (fnOrVar(colDef.editable, params) === false) {
13
- return;
14
- }
15
-
16
11
  const element = event.target as Element;
17
12
  // Already handled
18
- if (["BUTTON", "INPUT"].includes(element?.tagName) && element.closest(".ag-cell-inline-editing")) return;
13
+ if (
14
+ element.closest(".GridCell-readonly") ||
15
+ (["BUTTON", "INPUT"].includes(element?.tagName) && element.closest(".ag-cell-inline-editing"))
16
+ ) {
17
+ return;
18
+ }
19
19
 
20
20
  const row = element.closest("[row-id]");
21
21
  if (!row) return;