@wavelengthusaf/components 4.0.0 → 4.0.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/dist/cjs/index.cjs +6 -3
- package/dist/esm/index.js +6 -3
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -7831,6 +7831,11 @@ var WavelengthAutoComplete = ({
|
|
|
7831
7831
|
document.removeEventListener("mousedown", handleClickOutsideList);
|
|
7832
7832
|
};
|
|
7833
7833
|
}, [focusedIndex]);
|
|
7834
|
+
if (onDataChange !== void 0) {
|
|
7835
|
+
_react.useEffect.call(void 0, () => {
|
|
7836
|
+
onDataChange(inputValue);
|
|
7837
|
+
}, [inputValue]);
|
|
7838
|
+
}
|
|
7834
7839
|
const handleBlur = () => {
|
|
7835
7840
|
const exactMatch = data.find((item) => item === inputValue);
|
|
7836
7841
|
if (inputRef.current && inputValue === "") {
|
|
@@ -7872,9 +7877,7 @@ var WavelengthAutoComplete = ({
|
|
|
7872
7877
|
setInputValue(suggestions[focusedIndex]);
|
|
7873
7878
|
setIsDropdownVisible(false);
|
|
7874
7879
|
} else {
|
|
7875
|
-
if (data.includes(inputValue)) {
|
|
7876
|
-
if (onDataChange !== void 0) onDataChange(inputValue);
|
|
7877
|
-
} else {
|
|
7880
|
+
if (!data.includes(inputValue)) {
|
|
7878
7881
|
handleBlur;
|
|
7879
7882
|
}
|
|
7880
7883
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -7831,6 +7831,11 @@ var WavelengthAutoComplete = ({
|
|
|
7831
7831
|
document.removeEventListener("mousedown", handleClickOutsideList);
|
|
7832
7832
|
};
|
|
7833
7833
|
}, [focusedIndex]);
|
|
7834
|
+
if (onDataChange !== void 0) {
|
|
7835
|
+
useEffect11(() => {
|
|
7836
|
+
onDataChange(inputValue);
|
|
7837
|
+
}, [inputValue]);
|
|
7838
|
+
}
|
|
7834
7839
|
const handleBlur = () => {
|
|
7835
7840
|
const exactMatch = data.find((item) => item === inputValue);
|
|
7836
7841
|
if (inputRef.current && inputValue === "") {
|
|
@@ -7872,9 +7877,7 @@ var WavelengthAutoComplete = ({
|
|
|
7872
7877
|
setInputValue(suggestions[focusedIndex]);
|
|
7873
7878
|
setIsDropdownVisible(false);
|
|
7874
7879
|
} else {
|
|
7875
|
-
if (data.includes(inputValue)) {
|
|
7876
|
-
if (onDataChange !== void 0) onDataChange(inputValue);
|
|
7877
|
-
} else {
|
|
7880
|
+
if (!data.includes(inputValue)) {
|
|
7878
7881
|
handleBlur;
|
|
7879
7882
|
}
|
|
7880
7883
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@wavelengthusaf/components",
|
|
3
3
|
"author": "563 EWS - Wavelength",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "4.0.
|
|
5
|
+
"version": "4.0.1",
|
|
6
6
|
"description": "Common component library used by Wavelength developers",
|
|
7
7
|
"main": "/dist/cjs/index.cjs",
|
|
8
8
|
"module": "/dist/esm/index.js",
|