Commit 71cc25b2 by zhaochengxiang

bug fix

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