Commit ae19274c authored by 前端-许佳敏's avatar 前端-许佳敏

fix:修复searchSelect在单选下无法关闭

parent 1610bddb
......@@ -116,6 +116,10 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
// }
// const { run } = useDebounceFn(dispatchSearch, 500)
const multipleProps = multiple ? {
open: openSelect,
onFocus: () => setOpenSelect(true),
} : {}
return (
<Select
ref={ref}
......@@ -124,10 +128,9 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
filterOption={false}
loading={loading}
options={dataSource}
onFocus={() => setOpenSelect(true)}
value={props.value}
open={multiple ? openSelect : null}
dropdownRender={originNode => <SelectContent confirm={confirm} resetField={resetField} parentRef={ref} handleChange={handleChange} multiple={multiple} value={props.value}>{originNode}</SelectContent>}
{...multipleProps}
{...resetProps}
>
</Select>
......
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