Skip to content

Commit

Permalink
fix(app): case insensitively sort labware list (#14165)
Browse files Browse the repository at this point in the history
closes RQA-1955
  • Loading branch information
shlokamin authored Dec 11, 2023
1 parent 6f14276 commit 11d65b3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/src/pages/Labware/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@ export function useAllLabware(
: null
)
const sortLabware = (a: LabwareDefAndDate, b: LabwareDefAndDate): number => {
if (a.definition.metadata.displayName < b.definition.metadata.displayName) {
if (
a.definition.metadata.displayName.toUpperCase() <
b.definition.metadata.displayName.toUpperCase()
) {
return sortBy === 'alphabetical' ? -1 : 1
}
if (a.definition.metadata.displayName > b.definition.metadata.displayName) {
if (
a.definition.metadata.displayName.toUpperCase() >
b.definition.metadata.displayName.toUpperCase()
) {
return sortBy === 'alphabetical' ? 1 : -1
}
return 0
Expand Down

0 comments on commit 11d65b3

Please sign in to comment.