Sha256: 75a6c7bcbc17f04759826463beac70d12c193bb658a06e89e22a5d25c73c7109
Contents?: true
Size: 1.15 KB
Versions: 44
Compression:
Stored size: 1.15 KB
Contents
var React = require('react'); var Mui = require('material-ui'); var ConfigField = React.createClass({ componentDidMount: function() { this.setValue(this.props.value); }, componentDidUpdate: function() { if(this.props.hasToUpdateValues) { this.setValue(); this.props.onUpdatedValues(); } }, handleChange: function() { if(!this.props.lastItem) { this.props.onChange(this.props.configId, this.refs.configInput.getDOMNode().value); } }, setValue: function() { this.refs.configInput.getDOMNode().value = this.props.value; }, getValue: function() { return this.refs.configInput.getDOMNode().value; }, render: function() { return ( <div className='config-text-field-div'> <input ref='configInput' type='text' className='config-input' placeholder={this.props.placeholder} onChange={this.handleChange} required={true} /> </div>); } }); module.exports = ConfigField;
Version data entries
44 entries across 44 versions & 1 rubygems