Skip to content

Commit ae1a815

Browse files
Attila Csehpsychedelicious
authored andcommitted
change board - sorting order of boards alphabetical
1 parent 687bc28 commit ae1a815

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

invokeai/frontend/web/src/features/changeBoardModal/components/ChangeBoardModal.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ const ChangeBoardModal = () => {
3636

3737
const options = useMemo<ComboboxOption[]>(() => {
3838
return [{ label: t('boards.uncategorized'), value: 'none' }].concat(
39-
(boards ?? []).map((board) => ({
40-
label: board.board_name,
41-
value: board.board_id,
42-
}))
39+
(boards ?? [])
40+
.map((board) => ({
41+
label: board.board_name,
42+
value: board.board_id,
43+
}))
44+
.sort((a, b) => a.label.localeCompare(b.label))
4345
);
4446
}, [boards, t]);
4547

@@ -63,7 +65,6 @@ const ChangeBoardModal = () => {
6365
board_id: selectedBoard,
6466
});
6567
}
66-
setSelectedBoard(null);
6768
dispatch(changeBoardReset());
6869
}, [addImagesToBoard, dispatch, imagesToChange, removeImagesFromBoard, selectedBoard]);
6970

@@ -89,7 +90,6 @@ const ChangeBoardModal = () => {
8990
{t('boards.movingImagesToBoard', {
9091
count: imagesToChange.length,
9192
})}
92-
:
9393
</Text>
9494
<FormControl isDisabled={isFetching}>
9595
<Combobox

0 commit comments

Comments
 (0)