|
|
@ -36,10 +36,9 @@ export default class NewListForm extends React.PureComponent {
|
|
|
|
this.props.onChange(e.target.value);
|
|
|
|
this.props.onChange(e.target.value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
handleKeyUp = e => {
|
|
|
|
handleSubmit = e => {
|
|
|
|
if (e.keyCode === 13) {
|
|
|
|
e.preventDefault();
|
|
|
|
this.props.onSubmit();
|
|
|
|
this.props.onSubmit();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
handleClick = () => {
|
|
|
|
handleClick = () => {
|
|
|
@ -53,7 +52,7 @@ export default class NewListForm extends React.PureComponent {
|
|
|
|
const title = intl.formatMessage(messages.title);
|
|
|
|
const title = intl.formatMessage(messages.title);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className='column-inline-form'>
|
|
|
|
<form className='column-inline-form' onSubmit={this.handleSubmit}>
|
|
|
|
<label>
|
|
|
|
<label>
|
|
|
|
<span style={{ display: 'none' }}>{label}</span>
|
|
|
|
<span style={{ display: 'none' }}>{label}</span>
|
|
|
|
|
|
|
|
|
|
|
@ -62,7 +61,6 @@ export default class NewListForm extends React.PureComponent {
|
|
|
|
value={value}
|
|
|
|
value={value}
|
|
|
|
disabled={disabled}
|
|
|
|
disabled={disabled}
|
|
|
|
onChange={this.handleChange}
|
|
|
|
onChange={this.handleChange}
|
|
|
|
onKeyUp={this.handleKeyUp}
|
|
|
|
|
|
|
|
placeholder={label}
|
|
|
|
placeholder={label}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</label>
|
|
|
@ -73,7 +71,7 @@ export default class NewListForm extends React.PureComponent {
|
|
|
|
title={title}
|
|
|
|
title={title}
|
|
|
|
onClick={this.handleClick}
|
|
|
|
onClick={this.handleClick}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|