mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
UI Action Handler Changes, Misc Fixes
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import _ from 'lodash';
|
||||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||
|
||||
const whitelistedProperties = [
|
||||
'pageSize',
|
||||
'columns'
|
||||
];
|
||||
|
||||
function createSetTableOptionReducer(section) {
|
||||
return (state, { payload }) => {
|
||||
const newState = Object.assign(
|
||||
getSectionState(state, section),
|
||||
_.pick(payload, whitelistedProperties));
|
||||
|
||||
return updateSectionState(state, section, newState);
|
||||
};
|
||||
}
|
||||
|
||||
export default createSetTableOptionReducer;
|
||||
Reference in New Issue
Block a user