mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
Fixed: Editing provider/profile settings appearing to affect wrong item
This commit is contained in:
16
frontend/src/Store/Selectors/createSortedSectionSelector.js
Normal file
16
frontend/src/Store/Selectors/createSortedSectionSelector.js
Normal 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;
|
||||
Reference in New Issue
Block a user