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

Version Path
nutella_framework-0.6.4 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.6.3 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.6.2 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.6.1 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.6.0 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.5.1 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.5.0 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.32 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.31 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.30 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.29 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.28 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.27 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.26 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.25 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.24 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.23 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.22 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.21 framework_components/roomcast-package-creator/src/app/components/ConfigField.js
nutella_framework-0.4.20 framework_components/roomcast-package-creator/src/app/components/ConfigField.js