pin all projects selection to top of menu list

This commit is contained in:
Ryan Vazquez
2020-12-11 13:36:32 -05:00
parent 64c9fd84cd
commit 423fa86220
@@ -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 => (
<MenuItem
className={`${classes.menuItem} compact`}
key={proj.id}