1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-23 18:34:02 +02:00

Sorted categories on modification or creation (#2856)

* Sorted categories on modification or creation

* Sorting only once

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>

* Minor cleanup

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
This commit is contained in:
Harshil Sharma 2022-04-22 22:18:49 +05:30 committed by GitHub
parent eace2da582
commit ec9085cd25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,9 @@ const sidebarSlice = createSlice({
}
}
})
// sort categories alphabetically
state.categoryAttributes.sort((a, b) => a.name.localeCompare(b.name))
},
updateBoardCategories: (state, action: PayloadAction<Array<BoardCategoryWebsocketData>>) => {
action.payload.forEach((boardCategory) => {