diff --git a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx index e2ed21c90..549217619 100644 --- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx +++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx @@ -150,7 +150,7 @@ describe('SelectFilterPlugin', () => { ], }, filterState: { - label: '', + label: undefined, value: null, }, }); @@ -165,7 +165,7 @@ describe('SelectFilterPlugin', () => { }, extraFormData: {}, filterState: { - label: '', + label: undefined, value: null, }, }); diff --git a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx index 305667c29..3051e3fff 100644 --- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx @@ -138,7 +138,9 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) { inverseSelection, ), filterState: { - label: `${(values || []).join(', ')}${suffix}`, + label: values?.length + ? `${(values || []).join(', ')}${suffix}` + : undefined, value: appSection === AppSection.FILTER_CONFIG_MODAL && defaultToFirstItem ? undefined