diff --git a/frontend/src/component/feature/FeatureView/FeatureMetrics/FeatureMetrics.tsx b/frontend/src/component/feature/FeatureView/FeatureMetrics/FeatureMetrics.tsx index e1ee6698dbf8..bcb3da5df44c 100644 --- a/frontend/src/component/feature/FeatureView/FeatureMetrics/FeatureMetrics.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureMetrics/FeatureMetrics.tsx @@ -40,21 +40,19 @@ export const FeatureMetrics = () => { featureId, query.hoursBack || FEATURE_METRIC_HOURS_BACK_DEFAULT, ); - const defaultApplication = Array.from(applications)[0]; + + const allApplications = Array.from(applications); + const defaultApplication = allApplications[0]; const { environment: selectedEnvironment, hoursBack } = query; const selectedApplications = query.applications.filter( (item) => item !== null, ) as string[]; useEffect(() => { - if ( - query.applications && - query.applications.length === 0 && - defaultApplication - ) { - setQuery({ applications: [defaultApplication] }); + if (query.applications && query.applications.length === 0) { + setQuery({ applications: allApplications }); } - }, [JSON.stringify(Array.from(applications))]); + }, [JSON.stringify(allApplications)]); const allSelected = [...applications].every((element) => selectedApplications.includes(element), @@ -100,7 +98,7 @@ export const FeatureMetrics = () => { return ( - + 0} show={ @@ -115,7 +113,7 @@ export const FeatureMetrics = () => { } /> - + 0} show={ diff --git a/frontend/src/component/feature/FeatureView/FeatureMetrics/FeatureMetricsChips/FeatureMetricsChips.tsx b/frontend/src/component/feature/FeatureView/FeatureMetrics/FeatureMetricsChips/FeatureMetricsChips.tsx index 8f5a98fe28b3..254be1a5719f 100644 --- a/frontend/src/component/feature/FeatureView/FeatureMetrics/FeatureMetricsChips/FeatureMetricsChips.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureMetrics/FeatureMetricsChips/FeatureMetricsChips.tsx @@ -64,6 +64,15 @@ export const FeatureMetricsChips = ({
{title} + {toggleValues && values.size > 1 && ( + + )} {sortedValues.map((val) => ( ))} - - {toggleValues && values.size > 1 && ( - - )}
);