@linzjs/step-ag-grid 10.0.2 → 11.0.0

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": "10.0.2",
5
+ "version": "11.0.0",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -34,8 +34,8 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@linzjs/lui": ">=17",
37
- "ag-grid-community": "^28.2.1",
38
- "ag-grid-react": "^28.2.1",
37
+ "ag-grid-community": "27.3.0",
38
+ "ag-grid-react": "^27.3.0",
39
39
  "debounce-promise": "^3.1.2",
40
40
  "lodash-es": ">=4",
41
41
  "matcher": "^5.0.0",
@@ -316,11 +316,6 @@ export const Grid = (params: GridProps): JSX.Element => {
316
316
  }
317
317
  }, [columnDefs?.length, sizeColumnsToFit]);
318
318
 
319
- const defaultColDef = useMemo(
320
- () => ({ wrapHeaderText: true, autoHeaderHeight: true, ...params.defaultColDef }),
321
- [params.defaultColDef],
322
- );
323
-
324
319
  return (
325
320
  <div
326
321
  data-testid={params["data-testid"]}
@@ -349,7 +344,6 @@ export const Grid = (params: GridProps): JSX.Element => {
349
344
  <AgGridReact
350
345
  animateRows={params.animateRows}
351
346
  rowClassRules={params.rowClassRules}
352
- defaultColDef={defaultColDef}
353
347
  getRowId={(params) => `${params.data.id}`}
354
348
  suppressRowClickSelection={true}
355
349
  rowSelection={params.rowSelection ?? "multiple"}
@@ -134,7 +134,7 @@ export const ControlledMenuFr = (
134
134
  };
135
135
 
136
136
  const allowTabToSave = activeElement.getAttribute("data-allowtabtosave") == "true";
137
- if (allowTabToSave) {
137
+ if (allowTabToSave && ev.key === "Tab") {
138
138
  if (isDown) {
139
139
  ev.preventDefault();
140
140
  ev.stopPropagation();
@@ -71,7 +71,3 @@
71
71
  .Grid-container.ag-theme-alpine .ag-cell-wrapper {
72
72
  width: 100%;
73
73
  }
74
-
75
- .Grid-container.ag-theme-alpine ag-cell-label-container {
76
- padding: 0;
77
- }
@@ -73,6 +73,10 @@ describe("TextInputValidator", () => {
73
73
  tests: [
74
74
  ["xx", null],
75
75
  ["", "Must not be empty"],
76
+ ["\t", "Must not be empty"],
77
+ ["\n", "Must not be empty"],
78
+ ["\r", "Must not be empty"],
79
+ [" ", "Must not be empty"],
76
80
  ],
77
81
  },
78
82
  ] as (TextInputValidatorProps<GridBaseRow> & { tests: [string, string | undefined][] })[];
@@ -28,7 +28,7 @@ export const TextInputValidator = <RowType extends GridBaseRow>(
28
28
  if (typeof value !== "string") {
29
29
  return "Value is not a string";
30
30
  }
31
- if (props.required && value == "") {
31
+ if (props.required && value.trim() == "") {
32
32
  return "Must not be empty";
33
33
  }
34
34
  if (props.maxLength && value.length > props.maxLength) {