Browse Source

组件修复

XuZinan 2 years ago
parent
commit
af97640659
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/components/DDComponents/InnerContactField/index.js

+ 2 - 2
src/components/DDComponents/InnerContactField/index.js

@@ -14,7 +14,7 @@ function InnerContactField(props) {
     run();
   }, []);
   useEffect(() => {
-    if (user && userList) onChange(String(user.ID));
+    if (user && userList) onChange?.(String(user.ID));
   }, [user, userList]);
   return (
     <Select
@@ -22,7 +22,7 @@ function InnerContactField(props) {
       value={user.ID}
       defaultValue={value ? Number(value) : undefined}
       onChange={(value) => {
-        onChange(String(value));
+        onChange?.(String(value));
         // onChange(JSON.stringify([value]));
       }}
       loading={loading}