@linzjs/step-ag-grid 22.2.1 → 22.2.3

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/README.md CHANGED
@@ -221,6 +221,7 @@ To exclude a column from CSV download add ```export: false``` to the GridCell de
221
221
 
222
222
  ## Writing tests
223
223
 
224
+
224
225
  The following testing calls can be imported from step-ag-grid:
225
226
 
226
227
  - findRow
@@ -2343,13 +2343,12 @@ const clickInputWhenContainingCellClicked = (params) => {
2343
2343
  const { data, event, colDef } = params;
2344
2344
  if (!data || !event)
2345
2345
  return;
2346
- if (fnOrVar(colDef.editable, params) === false) {
2347
- return;
2348
- }
2349
2346
  const element = event.target;
2350
2347
  // Already handled
2351
- if (["BUTTON", "INPUT"].includes(element?.tagName) && element.closest(".ag-cell-inline-editing"))
2348
+ if (element.closest(".GridCell-readonly") ||
2349
+ (["BUTTON", "INPUT"].includes(element?.tagName) && element.closest(".ag-cell-inline-editing"))) {
2352
2350
  return;
2351
+ }
2353
2352
  const row = element.closest("[row-id]");
2354
2353
  if (!row)
2355
2354
  return;
@@ -4479,7 +4478,11 @@ const BooleanCellRenderer = (props) => {
4479
4478
  api.removeEventListener("cellFocused", checkFocus);
4480
4479
  };
4481
4480
  }, [api, column, node.rowIndex]);
4482
- return (jsxRuntime.jsx("div", { className: clsx("ag-wrapper ag-input-wrapper ag-checkbox-input-wrapper", { "ag-checked": props.value }), children: jsxRuntime.jsx("input", { type: "checkbox", className: "ag-input-field-input ag-checkbox-input", disabled: !fnOrVar(colDef?.editable, props), ref: inputRef, checked: value, onChange: () => { }, onClick: (e) => {
4481
+ const isDisabled = !fnOrVar(colDef?.editable, props);
4482
+ return (jsxRuntime.jsx("div", { className: clsx("ag-wrapper ag-input-wrapper ag-checkbox-input-wrapper", {
4483
+ "ag-checked": props.value,
4484
+ "ag-disabled": isDisabled,
4485
+ }), children: jsxRuntime.jsx("input", { type: "checkbox", className: "ag-input-field-input ag-checkbox-input", disabled: isDisabled, ref: inputRef, checked: value, onChange: () => { }, onClick: (e) => {
4483
4486
  e.stopPropagation();
4484
4487
  // cell has to be in edit mode
4485
4488
  // if in non-edit mode clickInputWhenContainingCellClicked will click to put it in edit mode