Advertisement
Guest User

Untitled

a guest
Nov 9th, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. class IdentifierComponent extends React.Component{
  3.     constructor(props){
  4.         super(props);
  5.         this.state = {
  6.             value: props.node.value
  7.         };
  8.     }
  9.  
  10.     @debounce(500)
  11.     updateProp(){
  12.         updateLiteral(this.state.value, this.props.path);
  13.     }
  14.  
  15.     update(e){
  16.         this.setState({
  17.             value: e.target.value
  18.         });
  19.     }
  20.  
  21.     render(){
  22.         let {node, path} = this.props;
  23.         return  <input
  24.                     className="field field--literal"
  25.                     onChange={e => this.update(e)}
  26.                     value={this.state.value}
  27.                     label="Variable"
  28.                 />;
  29.     }
  30. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement