@mtes-mct/monitor-ui 6.4.0 → 6.4.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 +12 -0
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [6.4.0](https://github.com/MTES-MCT/monitor-ui/compare/v6.3.3...v6.4.0) (2023-05-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **formiks:** delete setTouched in handleChange and delete touched condition for error ([17a9e24](https://github.com/MTES-MCT/monitor-ui/commit/17a9e249a74352f0696a9cc2146aa4e88422a542))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **fields:** add customSearch prop to Search ([53e993a](https://github.com/MTES-MCT/monitor-ui/commit/53e993ac1cd8c218a3bddbd5cef0d36778589166))
|
|
12
|
+
|
|
1
13
|
## [6.3.3](https://github.com/MTES-MCT/monitor-ui/compare/v6.3.2...v6.3.3) (2023-05-25)
|
|
2
14
|
|
|
3
15
|
|
package/index.js
CHANGED
|
@@ -20755,7 +20755,7 @@ function Search({ baseContainer, className, customSearch = undefined, customSear
|
|
|
20755
20755
|
const rsuiteValue = useMemo(() => getRsuiteValueFromOptionValue(value, optionValueKey), [value, optionValueKey]);
|
|
20756
20756
|
const [inputValue, setInputValue] = useState(rsuiteValue);
|
|
20757
20757
|
// Only used when `customSearch` prop is set
|
|
20758
|
-
const [controlledRsuiteData, setControlledRsuiteData] = useState(customSearch ?
|
|
20758
|
+
const [controlledRsuiteData, setControlledRsuiteData] = useState(customSearch ? [] : undefined);
|
|
20759
20759
|
const close = useCallback(() => {
|
|
20760
20760
|
setIsOpen(false);
|
|
20761
20761
|
}, []);
|
|
@@ -20770,7 +20770,7 @@ function Search({ baseContainer, className, customSearch = undefined, customSear
|
|
|
20770
20770
|
if (customSearch && customSearchRef.current) {
|
|
20771
20771
|
const nextControlledRsuiteData = nextQuery.trim().length >= customSearchMinQueryLength
|
|
20772
20772
|
? getRsuiteDataFromOptions(customSearchRef.current.find(nextQuery), optionValueKey)
|
|
20773
|
-
:
|
|
20773
|
+
: [];
|
|
20774
20774
|
setControlledRsuiteData(nextControlledRsuiteData);
|
|
20775
20775
|
}
|
|
20776
20776
|
queryRef.current = normalizeString(nextQuery);
|
|
@@ -20787,7 +20787,7 @@ function Search({ baseContainer, className, customSearch = undefined, customSear
|
|
|
20787
20787
|
if (onQuery) {
|
|
20788
20788
|
onQuery(queryRef.current);
|
|
20789
20789
|
}
|
|
20790
|
-
}, [customSearch, onChange, onQuery,
|
|
20790
|
+
}, [customSearch, onChange, onQuery, customSearchMinQueryLength, optionValueKey]);
|
|
20791
20791
|
const handleSelect = useCallback((_, item) => {
|
|
20792
20792
|
if (onChange) {
|
|
20793
20793
|
onChange(item.optionValue);
|