filxed filtering project by project status
This commit is contained in:
parent
2e2a5438d8
commit
b3906f460e
@ -41,13 +41,13 @@ const ProjectList = () => {
|
|||||||
grouped[statusId].push(project);
|
grouped[statusId].push(project);
|
||||||
});
|
});
|
||||||
|
|
||||||
const sortedGrouped = Object.keys(grouped)
|
const sortedGrouped = selectedStatuses
|
||||||
.sort()
|
.filter((statusId) => grouped[statusId])
|
||||||
.flatMap((statusId) =>
|
.flatMap((statusId) =>
|
||||||
grouped[statusId].sort((a, b) =>
|
grouped[statusId].sort((a, b) =>
|
||||||
a.name.toLowerCase().localeCompare(b.name.toLowerCase())
|
a.name.toLowerCase().localeCompare(b.name.toLowerCase())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
setProjectList(sortedGrouped);
|
setProjectList(sortedGrouped);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user