fix: lowercase name compare for sort

This commit is contained in:
Scott Wilson
2024-11-26 17:25:13 -08:00
parent bbf52c9a48
commit 4f4b5be8ea

View File

@@ -523,8 +523,8 @@ const OrganizationPage = () => {
.filter((ws) => ws?.name?.toLowerCase().includes(searchFilter.toLowerCase()))
.sort((a, b) =>
orderDirection === OrderByDirection.ASC
? a.name.localeCompare(b.name)
: b.name.localeCompare(a.name)
? a.name.toLowerCase().localeCompare(b.name.toLowerCase())
: b.name.toLowerCase().localeCompare(a.name.toLowerCase())
),
[searchFilter, page, perPage, orderDirection, offset, limit]
);