state.removeIn(pathToAttributeToRemove).updateIn([...pathToAttributes], attributes => { return attributes.keySeq().reduce((acc, current) => { if (acc.getIn([current, 'targetField']) === attributeToRemoveName) { return acc.removeIn([current, 'targetField']); } return acc; }, attributes); })
/** * Retrieve a field name depending on its index * @param {Number} itemIndex * @returns {String} */ getAttrName(itemIndex) { return this.state.getIn([ 'modifiedSchema', 'models', ...this.keys, 'fields', itemIndex, ]); }
state.updateIn(['modifiedData', ...action.pathToComponent], list => { return list .delete(action.dragIndex) .insert( action.hoverIndex, state.getIn(['modifiedData', ...action.pathToComponent, action.dragIndex]) ); })
state.updateIn(layoutPathRelations, list => { return list .delete(action.dragIndex) .insert( action.hoverIndex, state.getIn([...layoutPathRelations, action.dragIndex]) ); })
state .getIn(layoutPathEdit) .updateIn([listSize - 1, 'rowContent'], list => { if (list) { return list.push({ name: action.name, size, }); } return fromJS([{ name: action.name, size }]); })
state .update('metaToEdit', () => action.name) .updateIn(['metaForm'], () => state.getIn(['modifiedData', 'metadatas', action.name, 'edit']) )
state.updateIn(['modifiedData', ...action.keys], () => { const defaultDataStructure = state.getIn(['componentsDataStructure', action.componentUid]); return fromJS(defaultDataStructure); })
state.updateIn(layoutPathEdit, list => { return list .delete(action.dragRowIndex) .insert( action.hoverRowIndex, state.getIn([...layoutPathEdit, action.dragRowIndex]) ); })
state.removeIn(pathToAttributeToRemove).updateIn([...pathToAttributes], attributes => { return attributes.keySeq().reduce((acc, current) => { if (acc.getIn([current, 'targetField']) === attributeToRemoveName) { return acc.removeIn([current, 'targetField']); } return acc; }, attributes); })
state .update('metaToEdit', () => action.name) .updateIn(['metaForm'], () => state.getIn(['modifiedData', 'metadatas', action.name, 'edit']) )
state.updateIn(['modifiedData', ...action.pathToComponent], list => { return list .delete(action.dragIndex) .insert( action.hoverIndex, state.getIn(['modifiedData', ...action.pathToComponent, action.dragIndex]) ); })
state .getIn(layoutPathEdit) .updateIn([listSize - 1, 'rowContent'], list => { if (list) { return list.push({ name: action.name, size, }); } return fromJS([{ name: action.name, size }]); })
state.updateIn(layoutPathRelations, list => { return list .delete(action.dragIndex) .insert( action.hoverIndex, state.getIn([...layoutPathRelations, action.dragIndex]) ); })
state.updateIn(layoutPathEdit, list => { return list .delete(action.dragRowIndex) .insert( action.hoverRowIndex, state.getIn([...layoutPathEdit, action.dragRowIndex]) ); })
state.updateIn(['modifiedData', ...action.keys], () => { const defaultDataStructure = state.getIn(['componentsDataStructure', action.componentUid]); return fromJS(defaultDataStructure); })