From 423fa862205a3662168b18012a03b656ea3e3270 Mon Sep 17 00:00:00 2001 From: Ryan Vazquez Date: Fri, 11 Dec 2020 13:36:32 -0500 Subject: [PATCH 1/2] pin all projects selection to top of menu list --- .../src/components/ProjectSelect/ProjectSelect.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.tsx b/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.tsx index ee4641a4eb..bc34eb9c8d 100644 --- a/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.tsx +++ b/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.tsx @@ -31,7 +31,7 @@ export const ProjectSelect = ({ }: ProjectSelectProps) => { const classes = useStyles(); - const projectOptions = [{ id: 'all' } as Project, ...projects] + const projectOptions = projects .filter(p => p.id) .sort((a, b) => (a.id as string).localeCompare(b.id as string)); @@ -57,7 +57,7 @@ export const ProjectSelect = ({ onChange={handleOnChange} data-testid="project-filter-select" > - {projectOptions.map(proj => ( + {[{ id: 'all' }, ...projectOptions].map(proj => ( Date: Fri, 11 Dec 2020 13:48:12 -0500 Subject: [PATCH 2/2] changeset --- .changeset/cost-insights-tasty-years-laugh.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cost-insights-tasty-years-laugh.md diff --git a/.changeset/cost-insights-tasty-years-laugh.md b/.changeset/cost-insights-tasty-years-laugh.md new file mode 100644 index 0000000000..3728514fb1 --- /dev/null +++ b/.changeset/cost-insights-tasty-years-laugh.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cost-insights': patch +--- + +pin all projects selection to the top of menu list