Commit a9aae132 authored by 田翔's avatar 田翔

fix: 初始化的时候必填校验问题

parent dbb01e7d
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "2.8.4", "version": "2.8.5",
"description": "2.8.4: 默认当前时间bug", "description": "2.8.5: 初始化的时候必填校验问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -166,7 +166,11 @@ const UserGroup = (props) => { ...@@ -166,7 +166,11 @@ const UserGroup = (props) => {
}, []) }, [])
useEffect(() => { useEffect(() => {
if (addons) {
addons.setValue(addons.dataPath, presetValue)
} else {
onChange(presetValue) onChange(presetValue)
}
}, [presetValue]) }, [presetValue])
return ( return (
......
...@@ -37,7 +37,11 @@ const UserSelect = (props) => { ...@@ -37,7 +37,11 @@ const UserSelect = (props) => {
} }
useEffect(() => { useEffect(() => {
if (addons) {
addons.setValue(addons.dataPath, presetValue)
} else {
onChange(presetValue) onChange(presetValue)
}
}, [presetValue]) }, [presetValue])
useEffect(() => { useEffect(() => {
......
...@@ -98,7 +98,11 @@ const UserTree = (props) => { ...@@ -98,7 +98,11 @@ const UserTree = (props) => {
} }
useEffect(() => { useEffect(() => {
if (addons) {
addons.setValue(addons.dataPath, presetValue)
} else {
onChange(presetValue) onChange(presetValue)
}
}, [presetValue]) }, [presetValue])
useEffect(() => { useEffect(() => {
......
...@@ -21,7 +21,11 @@ const CascadeSelector = (props) => { ...@@ -21,7 +21,11 @@ const CascadeSelector = (props) => {
} }
useEffect(() => { useEffect(() => {
if (addons) {
addons.setValue(addons.dataPath, presetValue)
} else {
onChange(presetValue) onChange(presetValue)
}
}, [presetValue]) }, [presetValue])
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment