diff --git a/superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx b/superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx index 2e2c1e954..185829b23 100644 --- a/superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx +++ b/superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx @@ -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,