diff --git a/frontend/src/scenes/saved-insights/SavedInsightsFilters.tsx b/frontend/src/scenes/saved-insights/SavedInsightsFilters.tsx index 5db5f5b5ffb9a..c8d5351301553 100644 --- a/frontend/src/scenes/saved-insights/SavedInsightsFilters.tsx +++ b/frontend/src/scenes/saved-insights/SavedInsightsFilters.tsx @@ -26,23 +26,25 @@ export function SavedInsightsFilters(): JSX.Element { value={search || ''} />
-
- On dashboard: - ({ - value: nsd.id, - label: nsd.name, - }))} - value={dashboardId} - onChange={(newValue) => { - setSavedInsightsFilters({ dashboardId: newValue }) - }} - dropdownMatchSelectWidth={false} - data-attr="insight-on-dashboard" - allowClear={true} - /> -
+ {nameSortedDashboards.length > 0 && ( +
+ On dashboard: + ({ + value: nsd.id, + label: nsd.name, + }))} + value={dashboardId} + onChange={(newValue) => { + setSavedInsightsFilters({ dashboardId: newValue }) + }} + dropdownMatchSelectWidth={false} + data-attr="insight-on-dashboard" + allowClear={true} + /> +
+ )}
Type: