@mtes-mct/monitor-ui 2.13.0 → 2.13.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [2.13.0](https://github.com/MTES-MCT/monitor-ui/compare/v2.12.1...v2.13.0) (2023-02-07)
2
+
3
+
4
+ ### Features
5
+
6
+ * **fields:** make option value generic in MultiCheckbox, MultiRadio, MultiSelect & Select ([d92ae33](https://github.com/MTES-MCT/monitor-ui/commit/d92ae332495407e3dbbcdc5d17d13161002f34ef))
7
+
1
8
  ## [2.12.1](https://github.com/MTES-MCT/monitor-ui/compare/v2.12.0...v2.12.1) (2023-02-07)
2
9
 
3
10
 
package/index.js CHANGED
@@ -5029,7 +5029,7 @@ disabled = false, error, isInline = false, isLabelHidden = false, isLight = fals
5029
5029
  }
5030
5030
  }, [onChange]);
5031
5031
  useFieldUndefineEffect(disabled, onChange);
5032
- const checkboxesElement = useMemo(() => (jsx(Fragment, { children: options.map((option, index) => (jsx(Checkbox, { defaultChecked: defaultValue.includes(option.value), disabled: disabled, label: option.label, name: `${name}${index}`, onChange: (isChecked) => handleChange(option.value, isChecked) }, option.value))) })),
5032
+ const checkboxesElement = useMemo(() => (jsx(Fragment, { children: options.map((option, index) => (jsx(Checkbox, { defaultChecked: defaultValue.includes(option.value), disabled: disabled, label: option.label, name: `${name}${index}`, onChange: (isChecked) => handleChange(option.value, isChecked) }, String(option.value)))) })),
5033
5033
  // eslint-disable-next-line react-hooks/exhaustive-deps
5034
5034
  [disabled, handleChange, name, options]);
5035
5035
  return (jsxs(Fieldset, { isHidden: isLabelHidden, isLight: isLight, legend: label, children: [jsx(ChecboxesBox$1, { "$isInline": isInline, children: checkboxesElement }), hasError && jsx(FieldError, { children: controlledError })] }, key));