PLT-4125 Prevent typing on settings that use the regenerate button (#4016)

This commit is contained in:
enahum
2016-09-14 09:28:50 -03:00
committed by Joram Wilander
parent 1e7985a87a
commit abe6e8e471

View File

@@ -37,14 +37,9 @@ export default class GeneratedSetting extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
this.regenerate = this.regenerate.bind(this);
}
handleChange(e) {
this.props.onChange(this.props.id, e.target.value === 'true');
}
regenerate(e) {
e.preventDefault();
@@ -76,8 +71,7 @@ export default class GeneratedSetting extends React.Component {
id={this.props.id}
placeholder={this.props.placeholder}
value={this.props.value}
onChange={this.handleChange}
disabled={this.props.disabled}
disabled={true}
/>
{disabledText}
<div className='help-text'>