Skip to content

Commit 779cbbf

Browse files
authored
fix: sort tag and map filter options alphabetically in recording selector (#283)
1 parent 67313a9 commit 779cbbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/pages/recording-selector/RecordingSelector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ export function RecordingSelector(): JSX.Element {
113113
};
114114

115115
// Derived data
116-
const uniqueMaps = createMemo(() => [...new Set(recordings().map((o) => o.worldName))]);
117-
const uniqueTags = createMemo(() => [...new Set(recordings().map((o) => o.tag).filter(Boolean))] as string[]);
116+
const uniqueMaps = createMemo(() => [...new Set(recordings().map((o) => o.worldName))].sort((a, b) => a.localeCompare(b)));
117+
const uniqueTags = createMemo(() => ([...new Set(recordings().map((o) => o.tag).filter(Boolean))] as string[]).sort((a, b) => a.localeCompare(b)));
118118

119119
const hasPlayerData = createMemo(() => recordings().some(r => (r.playerCount ?? 0) > 0));
120120
const hasKillData = createMemo(() => recordings().some(r => (r.killCount ?? 0) > 0));

0 commit comments

Comments
 (0)