Skip to content
Snippets Groups Projects
Unverified Commit 272e3e63 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Manual backport - Respect alphabetical order of collections in "Move" modal (#31355) (#31549)

* Backport changes from #31355
- Skip tests because the setup depends on refactoring done in master
- See discussion: https://metaboat.slack.com/archives/C505ZNNH4/p1686648256978279

* Remove unused code
parent 6421212e
No related merge requests found
......@@ -80,10 +80,13 @@ const Collections = createEntity({
selectors: {
getExpandedCollectionsById: createSelector(
[state => state.entities.collections || {}, getUserPersonalCollectionId],
[
state => Collections.selectors.getList(state),
getUserPersonalCollectionId,
],
(collections, currentUserPersonalCollectionId) =>
getExpandedCollectionsById(
Object.values(collections),
collections || [],
currentUserPersonalCollectionId,
),
),
......
......@@ -45,9 +45,8 @@ const SnippetCollections = createEntity({
selectors: {
getExpandedCollectionsById: createSelector(
state => state.entities.snippetCollections || {},
collections =>
getExpandedCollectionsById(Object.values(collections), null),
state => SnippetCollections.selectors.getList(state) || [],
collections => getExpandedCollectionsById(collections, null),
),
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment