fix(container): make blank string as valid value EE-6852 (#11372)

pull/11379/head
cmeng 9 months ago committed by GitHub
parent 8880876bcd
commit db16888379
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -94,7 +94,9 @@ export function SingleSelect<TValue = string>({
...aria ...aria
}: SingleProps<TValue>) { }: SingleProps<TValue>) {
const selectedValue = const selectedValue =
value || (typeof value === 'number' && value === 0) value ||
(typeof value === 'number' && value === 0) ||
(typeof value === 'string' && value === '')
? _.first(findSelectedOptions<TValue>(options, value)) ? _.first(findSelectedOptions<TValue>(options, value))
: null; : null;

Loading…
Cancel
Save