@gridsuite/commons-ui 0.234.0 → 0.236.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.
|
@@ -68,7 +68,7 @@ const CustomAgGridTable = forwardRef(
|
|
|
68
68
|
const [selectedRows, setSelectedRows] = useState([]);
|
|
69
69
|
const [newRowAdded, setNewRowAdded] = useState(false);
|
|
70
70
|
const [isSortApplied, setIsSortApplied] = useState(false);
|
|
71
|
-
const { control, getValues, watch } = useFormContext();
|
|
71
|
+
const { control, getValues, watch, clearErrors } = useFormContext();
|
|
72
72
|
const useFieldArrayOutput = useFieldArray({
|
|
73
73
|
control,
|
|
74
74
|
name
|
|
@@ -139,8 +139,9 @@ const CustomAgGridTable = forwardRef(
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
update(rowIndex, event.data);
|
|
142
|
+
clearErrors(name);
|
|
142
143
|
},
|
|
143
|
-
[getIndex, update]
|
|
144
|
+
[getIndex, update, clearErrors, name]
|
|
144
145
|
);
|
|
145
146
|
const onSortChanged = useCallback((event) => {
|
|
146
147
|
const isAnycolumnhasSort = event.api.getColumnState().some((col) => col.sort);
|
|
@@ -105,6 +105,8 @@ function ExplicitNamingFilterForm({
|
|
|
105
105
|
id: FieldConstants.EQUIPMENT_ID
|
|
106
106
|
}),
|
|
107
107
|
field: FieldConstants.EQUIPMENT_ID,
|
|
108
|
+
// force the data type instead of letting AG Grid infer it from the (CSV) cell values
|
|
109
|
+
cellDataType: "text",
|
|
108
110
|
editable: true,
|
|
109
111
|
singleClickEdit: true,
|
|
110
112
|
flex: 1,
|
|
@@ -115,6 +117,8 @@ function ExplicitNamingFilterForm({
|
|
|
115
117
|
newColumnDefs.push({
|
|
116
118
|
headerName: intl.formatMessage({ id: DISTRIBUTION_KEY }),
|
|
117
119
|
field: DISTRIBUTION_KEY,
|
|
120
|
+
// force the data type instead of letting AG Grid infer it from the (CSV) cell values
|
|
121
|
+
cellDataType: "number",
|
|
118
122
|
editable: true,
|
|
119
123
|
singleClickEdit: true,
|
|
120
124
|
cellEditor: NumericEditor,
|
|
@@ -127,7 +127,7 @@ const handlePostSortRows = (isFromContingency) => (params) => {
|
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
agGridRows.forEach((row) => {
|
|
130
|
-
if (isContingency &&
|
|
130
|
+
if (isContingency && row.data.linkedElementId == null && !row.data[idField]) {
|
|
131
131
|
mappedRows.get("contingencies").push(row);
|
|
132
132
|
} else if (row.data[idField] == null) {
|
|
133
133
|
const group = mappedRows.get(row.data.linkedElementId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsuite/commons-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.236.0",
|
|
4
4
|
"description": "common react components for gridsuite applications",
|
|
5
5
|
"author": "gridsuite team",
|
|
6
6
|
"homepage": "https://github.com/gridsuite",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"start": "vite demo/ --config vite.config.ts",
|
|
34
|
+
"start:checks": "VITE_CHECKER_ENABLED=true vite demo/ --config vite.config.ts",
|
|
34
35
|
"start:open": "vite demo/ --config vite.config.ts --open",
|
|
35
36
|
"build": "vite build",
|
|
36
37
|
"build:pack": "tsc && vite build && npm pack",
|