fix: select null value (#1961)

This commit is contained in:
katherinehhh 2023-05-31 16:00:08 +08:00 committed by GitHub
parent 261ca0dbbb
commit 98be397574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ const InternalSelect = connect(
allowClear
dropdownMatchSelectWidth={false}
notFoundContent={loading ? <Spin /> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />}
value={value}
value={value?value:undefined}
{...others}
onChange={(changed) => {
props.onChange?.(changed === undefined ? null : changed);