@gridsuite/commons-ui 0.235.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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.235.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",