fix: Make sure the DeprecatedSelect label is always a string (#23758)
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
This commit is contained in:
parent
c9ca17220f
commit
7a6fb86cbb
|
|
@ -161,13 +161,15 @@ function styled<
|
|||
filterOption,
|
||||
ignoreAccents = false, // default is `true`, but it is slow
|
||||
|
||||
asText = (value: any) => String(value ?? ''),
|
||||
|
||||
getOptionValue = option =>
|
||||
typeof option === 'string' ? option : option[valueKey],
|
||||
|
||||
getOptionLabel = option =>
|
||||
typeof option === 'string'
|
||||
? option
|
||||
: option[labelKey] || option[valueKey],
|
||||
: asText(option[labelKey]) || asText(option[valueKey]),
|
||||
|
||||
formatOptionLabel = (
|
||||
option: OptionType,
|
||||
|
|
|
|||
Loading…
Reference in New Issue