lu-lowcode-package-form 0.11.79 → 0.11.80

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.11.79",
3
+ "version": "0.11.80",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
@@ -179,9 +179,9 @@ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsVal
179
179
  }
180
180
  list[index] = { ...item, label: item[option_label], value: item[option_value] }
181
181
  }
182
- if (nOptions.length > 0 && !isEqual(nOptions, list)) {
182
+ if (nOptions.length > 0 && !isEqual(nOptions, list) && !list.some(item => item.value == value?.value)) {
183
183
  console.log(`[${props?.label}]handleOptions onChange(undefined)`)
184
- // 忘记这行有啥用了,但他会造成debounceFetchOptions之后下拉框置空,暂时弃用
184
+ // 如果选项发生变化,并且选项中没有当前已经选择的数据,则清空当前已经选择的数据
185
185
  typeof onChange === 'function' && onChange(undefined)
186
186
  }
187
187
  }