lu-lowcode-package-form 0.10.62 → 0.10.64
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.cjs.js +43 -43
- package/dist/index.es.js +520 -517
- package/package.json +1 -1
- package/src/components/field/select/search-select.jsx +5 -1
package/package.json
CHANGED
@@ -205,7 +205,11 @@ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsVal
|
|
205
205
|
let newOptions = await fetchList(nextPageParams, null);
|
206
206
|
newOptions = await handleOptions(newOptions);
|
207
207
|
if (Array.isArray(newOptions) && newOptions.length > 0) {
|
208
|
-
setNOptions(prevOptions =>
|
208
|
+
setNOptions(prevOptions => {
|
209
|
+
const existingValues = new Set(prevOptions.map(option => option.value));
|
210
|
+
const filteredNewOptions = newOptions.filter(option => !existingValues.has(option.value));
|
211
|
+
return [...prevOptions, ...filteredNewOptions];
|
212
|
+
});
|
209
213
|
} else {
|
210
214
|
isAllLoadedRef.current = true;
|
211
215
|
}
|