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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lu-lowcode-package-form",
3
- "version": "0.10.62",
3
+ "version": "0.10.64",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
@@ -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 => [...prevOptions, ...newOptions]);
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
  }