lu-lowcode-package-form 0.10.74 → 0.10.76

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.74",
3
+ "version": "0.10.76",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
@@ -38,8 +38,8 @@ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsVal
38
38
  // }, [requestParams, fieldsValue])
39
39
 
40
40
  useEffect(() => {
41
- console.log("SearchSelect useEffect shouldUpdateKey", shouldUpdateKey)
42
- console.log("SearchSelect useEffect requestParams", requestParams)
41
+ // console.log("SearchSelect useEffect shouldUpdateKey", shouldUpdateKey)
42
+ // console.log("SearchSelect useEffect requestParams", requestParams)
43
43
  initData(requestParams)
44
44
  }, [shouldUpdateKey, requestParams])
45
45
  // }, [ requestParams])
@@ -437,6 +437,7 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
437
437
  const changedFieldsState = React.useRef({});
438
438
  const timeoutRef = React.useRef(null);
439
439
 
440
+ // 注意:初始化 setFieldsValue 的时候,如果没有更新lastFormValues,或者请求过慢,没有连上500毫秒的防抖,可能会造成数据加载异常(字段变化,填充的连锁反应,造成数据更新成非setFieldsValue的数据)
440
441
  const debounceHandleFieldsChange = React.useCallback(() => {
441
442
  if (timeoutRef.current) {
442
443
  clearTimeout(timeoutRef.current);
@@ -455,10 +456,6 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
455
456
  for (let key in changedFieldsState.current) {
456
457
  let field = changedFieldsState.current[key];
457
458
  if (!isEqual(field.value || "", getLastFieldValue(field.name) || "")) {
458
- console.log("!isEqual field.name", field.name)
459
- console.log("field.value", field.value)
460
- console.log("getLastFieldValue(field.name)", getLastFieldValue(field.name))
461
- console.log("lockStatus_", lockStatus_)
462
459
  if (lockStatus_ != 1) {
463
460
  needRefresh = handleFieldsWith(field.name, fieldValues);
464
461
  }