Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save calvinfroedge/084ab9f525986e5f4b670b8bee6c41e7 to your computer and use it in GitHub Desktop.
Save calvinfroedge/084ab9f525986e5f4b670b8bee6c41e7 to your computer and use it in GitHub Desktop.
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