@linzjs/step-ag-grid 17.4.10 → 17.5.1
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/GridTheme.scss +28 -6
- package/dist/src/components/Grid.d.ts +5 -1
- package/dist/step-ag-grid.cjs.js +3 -3
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +3 -3
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +8 -2
- package/src/styles/GridTheme.scss +28 -6
package/package.json
CHANGED
package/src/components/Grid.tsx
CHANGED
|
@@ -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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
}
|
|
@@ -187,4 +194,19 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
187
194
|
.ag-cell-wrapper {
|
|
188
195
|
width: 100%;
|
|
189
196
|
}
|
|
197
|
+
|
|
198
|
+
.ag-row-highlight-above::after, .ag-row-highlight-below::after {
|
|
199
|
+
content: '';
|
|
200
|
+
height: 2px;
|
|
201
|
+
background-color: transparent;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.ag-row-highlight-above::after{
|
|
205
|
+
border-top: 2px dashed lui.$andrea;
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.ag-row-highlight-below::after {
|
|
210
|
+
border-bottom: 2px dashed lui.$andrea;
|
|
211
|
+
}
|
|
190
212
|
}
|