Created
August 4, 2016 20:55
-
-
Save calvinfroedge/084ab9f525986e5f4b670b8bee6c41e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
triggerUpdate(props){ | |
if(!props) props = this.props; | |
const { updateTarget } = this; | |
if(updateTarget === false) return; | |
let dataRaw = props.data.getIn(['data'].concat(updateTarget)).toJS(); | |
let controlType = updateTarget[updateTarget.length-1]; | |
let rowIndex = updateTarget[0]; | |
let component = this.getUpdateTargetRef(rowIndex, controlType); | |
let controlMode = dataRaw.state; | |
let newModeRender = this.buildControlMode(controlType, controlMode, dataRaw, rowIndex, component.state.modeKeys.length); | |
let componentModes = component.state.modes; | |
componentModes[controlMode] = newModeRender; | |
component.setState({modes: componentModes}); | |
component.forceUpdate(); | |
this.updateTarget = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment