UI Formatting Cleanup
This commit is contained in:
@@ -2,28 +2,6 @@ import _ from 'lodash';
|
||||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||
|
||||
const whitelistedProperties = [
|
||||
'isFetching',
|
||||
'isPopulated',
|
||||
'error',
|
||||
'isFetchingSchema',
|
||||
'schemaPopulated',
|
||||
'schemaError',
|
||||
'schema',
|
||||
'selectedSchema',
|
||||
'isSaving',
|
||||
'saveError',
|
||||
'isTesting',
|
||||
'isDeleting',
|
||||
'deleteError',
|
||||
'pendingChanges',
|
||||
'filterKey',
|
||||
'filterValue',
|
||||
'page',
|
||||
'sortKey',
|
||||
'sortDirection'
|
||||
];
|
||||
|
||||
const blacklistedProperties = [
|
||||
'section',
|
||||
'id'
|
||||
@@ -33,7 +11,7 @@ function createSetReducer(section) {
|
||||
return (state, { payload }) => {
|
||||
if (section === payload.section) {
|
||||
const newState = Object.assign(getSectionState(state, section),
|
||||
_.omit(payload, blacklistedProperties));
|
||||
_.omit(payload, blacklistedProperties));
|
||||
|
||||
return updateSectionState(state, section, newState);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user