Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class IdentifierComponent extends React.Component{
- constructor(props){
- super(props);
- this.state = {
- value: props.node.value
- };
- }
- @debounce(500)
- updateProp(){
- updateLiteral(this.state.value, this.props.path);
- }
- update(e){
- this.setState({
- value: e.target.value
- });
- }
- render(){
- let {node, path} = this.props;
- return <input
- className="field field--literal"
- onChange={e => this.update(e)}
- value={this.state.value}
- label="Variable"
- />;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement