Commit 71cc25b2 by zhaochengxiang

bug fix

parent 3ec85344
......@@ -135,7 +135,7 @@ export const Basic = React.forwardRef(function ({ cooperators, item }, ref) {
callback: data => {
setLoading(false)
//id int转string
const newData = produce(data??[], (draft) => {
const newData = produce((data??[]).filter(item=>item.cooperatorCandidate), (draft) => {
draft.forEach(item => {
item.id = `${item.id}`
})
......
......@@ -134,7 +134,7 @@ export const Basic = React.forwardRef(function ({ owner, item }, ref) {
callback: data => {
setLoading(false)
//id int转string
const newData = produce(data??[], (draft) => {
const newData = produce((data??[]).filter(item=>item.cooperatorCandidate), (draft) => {
draft.forEach(item => {
item.id = `${item.id}`
})
......@@ -184,7 +184,7 @@ const UsersItem = ({ loading, users, value, onChange }) => {
return (
<Select loading={loading} searchValue allowClear
placeholder='请选择用户'
value={options?value?.id:undefined}
value={(options??[]).length>0?value?.id:undefined}
searchValue={searchValue}
onSearch={(val) => {
setSearchValue(val)
......
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