mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Editing provider/profile settings appearing to affect wrong item
This commit is contained in:
parent
843bc6aabc
commit
b592b11b97
16 changed files with 53 additions and 53 deletions
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;
|
Loading…
Add table
Add a link
Reference in a new issue