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);
|
||||
});
|
||||
|
||||
const sortedGrouped = Object.keys(grouped)
|
||||
.sort()
|
||||
.flatMap((statusId) =>
|
||||
grouped[statusId].sort((a, b) =>
|
||||
a.name.toLowerCase().localeCompare(b.name.toLowerCase())
|
||||
)
|
||||
);
|
||||
const sortedGrouped = selectedStatuses
|
||||
.filter((statusId) => grouped[statusId])
|
||||
.flatMap((statusId) =>
|
||||
grouped[statusId].sort((a, b) =>
|
||||
a.name.toLowerCase().localeCompare(b.name.toLowerCase())
|
||||
)
|
||||
);
|
||||
|
||||
setProjectList(sortedGrouped);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user