@sustaina/shared-ui 1.29.1 → 1.30.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.
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2726,6 +2726,16 @@ var LookupSelect = ({
|
|
|
2726
2726
|
}
|
|
2727
2727
|
};
|
|
2728
2728
|
}, [inputValue, fetchSuggestions, suggestionDebounce, upsertOptionLabels]);
|
|
2729
|
+
React4.useEffect(() => {
|
|
2730
|
+
if (!fetchSuggestions) return;
|
|
2731
|
+
if (value.length === 0) return;
|
|
2732
|
+
const unresolvedValues = value.filter((v) => !optionLabels[v]);
|
|
2733
|
+
if (unresolvedValues.length === 0) return;
|
|
2734
|
+
fetchSuggestions("").then((options) => {
|
|
2735
|
+
upsertOptionLabels(options);
|
|
2736
|
+
}).catch(() => {
|
|
2737
|
+
});
|
|
2738
|
+
}, [value, fetchSuggestions, optionLabels, upsertOptionLabels]);
|
|
2729
2739
|
React4.useEffect(() => {
|
|
2730
2740
|
const handleDocumentClick = (event) => {
|
|
2731
2741
|
const target = event.target;
|