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:
parent
eace2da582
commit
ec9085cd25
1 changed files with 3 additions and 0 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue