@linzjs/step-ag-grid 17.4.10 → 17.5.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": "17.4.10",
5
+ "version": "17.5.0",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -96,6 +96,11 @@ export interface GridProps {
96
96
  * Whether to select row on context menu.
97
97
  */
98
98
  contextMenuSelectRow?: boolean;
99
+
100
+ /**
101
+ * Defaults to false.
102
+ */
103
+ singleClickEdit?: boolean;
99
104
  }
100
105
 
101
106
  /**
@@ -109,6 +114,7 @@ export const Grid = ({
109
114
  sizeColumns = "auto",
110
115
  selectColumnPinned = null,
111
116
  contextMenuSelectRow = false,
117
+ singleClickEdit = false,
112
118
  rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined,
113
119
  ...params
114
120
  }: GridProps): ReactElement => {
@@ -469,11 +475,11 @@ export const Grid = ({
469
475
  */
470
476
  const onCellClicked = useCallback(
471
477
  (event: CellEvent) => {
472
- if (event.colDef?.cellRendererParams?.singleClickEdit) {
478
+ if (event.colDef?.cellRendererParams?.singleClickEdit ?? singleClickEdit) {
473
479
  startCellEditing(event);
474
480
  }
475
481
  },
476
- [startCellEditing],
482
+ [singleClickEdit, startCellEditing],
477
483
  );
478
484
 
479
485
  /**
@@ -10,18 +10,21 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
10
10
  themes: (
11
11
  'step-compact.theme-specific': (
12
12
  extend-theme: alpine,
13
- --ag-row-height: 36px,
14
- --ag-header-height: 36px,
15
- --ag-font-size: calc($grid-base-font-size - 2px),
13
+ row-height: 36px,
14
+ header-height: 36px,
15
+ font-size: calc($grid-base-font-size - 2px),
16
16
  ),
17
17
  'step-default.theme-specific': (
18
18
  extend-theme: alpine,
19
- --ag-row-height: 40px,
20
- --ag-header-height: 40px,
21
- --ag-font-size: calc($grid-base-font-size),
19
+ row-height: 40px,
20
+ header-height: 40px,
21
+ font-size: calc($grid-base-font-size),
22
22
  ),
23
23
  ),
24
24
 
25
+ input-focus-border-color: lui.$sea,
26
+ borders-input: 1px solid,
27
+ input-border-color: lui.$silver,
25
28
  alpine-active-color: lui.$sea,
26
29
  background-color: lui.$white,
27
30
  border-color: lui.$dew,
@@ -49,6 +52,10 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
49
52
 
50
53
  .ag-theme-step-default.theme-specific,
51
54
  .ag-theme-step-compact.theme-specific {
55
+ .ag-text-area-input:focus {
56
+ border-color: lui.$sea;
57
+ }
58
+
52
59
  .ag-cell[col-id="selection"] {
53
60
  display: flex; // Fix that when you click below checkbox it doesn't process a click
54
61
  }