You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
534 B
21 lines
534 B
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;
|