Fixed: Editing provider/profile settings appearing to affect wrong item

This commit is contained in:
ta264
2020-02-16 14:35:19 +00:00
committed by Qstick
parent dc22c8df1f
commit d5ddebb7ac
15 changed files with 50 additions and 51 deletions

View File

@@ -0,0 +1,16 @@
import { createSelector } from 'reselect';
import getSectionState from 'Utilities/State/getSectionState';
function createSortedSectionSelector(section, comparer) {
return createSelector(
(state) => state,
(state) => {
const sectionState = getSectionState(state, section, true);
return {
...sectionState,
items: [...sectionState.items].sort(comparer)
};
}
);
}
export default createSortedSectionSelector;