Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/src/elements/ak-dual-select/ak-dual-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import {
} from "./types.js";

function localeComparator(a: DualSelectPair, b: DualSelectPair) {
const aSortBy = a[2];
const bSortBy = b[2];
const aSortBy = a[2] || a[0];
const bSortBy = b[2] || a[0];

return aSortBy.localeCompare(bSortBy);
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/elements/ak-dual-select/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export type DualSelectPair<T = unknown> = [
/**
* A string to sort by. If not provided, the key will be used.
*/
sortBy: string,
sortBy?: string,
/**
* A local mapping of the key to the object. This is used by some specific apps.
*
Expand Down
Loading