@mtes-mct/monitor-ui 2.14.3 → 2.14.5
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 +14 -0
- package/index.js +12 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.14.4](https://github.com/MTES-MCT/monitor-ui/compare/v2.14.3...v2.14.4) (2023-02-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **formiks:** initialize FormikCheckbox form value on mount ([741505f](https://github.com/MTES-MCT/monitor-ui/commit/741505f7a6705cec2fa439284dff04de43fce962))
|
|
7
|
+
|
|
8
|
+
## [2.14.3](https://github.com/MTES-MCT/monitor-ui/compare/v2.14.2...v2.14.3) (2023-02-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **fields:** enforce error margins ([eb69017](https://github.com/MTES-MCT/monitor-ui/commit/eb69017e720bb97a64fac46cd3d35ae18b6b60a5))
|
|
14
|
+
|
|
1
15
|
## [2.14.2](https://github.com/MTES-MCT/monitor-ui/compare/v2.14.1...v2.14.2) (2023-02-08)
|
|
2
16
|
|
|
3
17
|
|
package/index.js
CHANGED
|
@@ -5551,6 +5551,7 @@ searchable = false, ...originalProps }) {
|
|
|
5551
5551
|
}
|
|
5552
5552
|
}
|
|
5553
5553
|
if (targetElement.classList.contains('rs-picker-toggle') ||
|
|
5554
|
+
targetElement.classList.contains('rs-picker-toggle-value') ||
|
|
5554
5555
|
targetElement.classList.contains('rs-stack-item') ||
|
|
5555
5556
|
targetElement.classList.contains('rs-picker-toggle-caret') ||
|
|
5556
5557
|
targetElement.classList.contains('rs-picker-toggle-placeholder')) {
|
|
@@ -5602,6 +5603,10 @@ const Box = styled.div `
|
|
|
5602
5603
|
line-height: 1.3846;
|
|
5603
5604
|
}
|
|
5604
5605
|
|
|
5606
|
+
> .rs-picker-toggle-clean.rs-btn-close {
|
|
5607
|
+
top: 4px !important;
|
|
5608
|
+
}
|
|
5609
|
+
|
|
5605
5610
|
> svg {
|
|
5606
5611
|
height: 18px;
|
|
5607
5612
|
margin-top: -2px;
|
|
@@ -5685,6 +5690,13 @@ function FormikCheckbox({ name, ...originalProps }) {
|
|
|
5685
5690
|
const handleChange = useMemo(() => helpers.setValue, []);
|
|
5686
5691
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5687
5692
|
const isDefaultChecked = useMemo(() => Boolean(field.value), []);
|
|
5693
|
+
// A checkbox must initialize its Formik value on mount:
|
|
5694
|
+
// it wouldn't make sense to keep it as `undefined` since `undefined` means `false` in the case of a checkbox
|
|
5695
|
+
useEffect(() => {
|
|
5696
|
+
helpers.setValue(isDefaultChecked);
|
|
5697
|
+
},
|
|
5698
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5699
|
+
[]);
|
|
5688
5700
|
return (jsx(Checkbox, { defaultChecked: isDefaultChecked, error: meta.error, name: name, onChange: handleChange, ...originalProps }));
|
|
5689
5701
|
}
|
|
5690
5702
|
|