dependencies updated

This commit is contained in:
or-else
2019-06-11 17:01:11 -07:00
parent f9e78bf280
commit 821ab6a16f
13 changed files with 1659 additions and 640 deletions
+12
View File
@@ -26,6 +26,7 @@ class ValidationView extends React.PureComponent {
this.handleChange = this.handleChange.bind(this);
this.handleKeyPress = this.handleKeyPress.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleCancel = this.handleCancel.bind(this);
}
handleChange(e) {
@@ -35,6 +36,8 @@ class ValidationView extends React.PureComponent {
handleKeyPress(e) {
if (e.key === 'Enter') {
this.handleSubmit(e);
} else if (e.key == 'Escape') {
this.handleCancel(e);
}
}
@@ -45,6 +48,12 @@ class ValidationView extends React.PureComponent {
}
}
handleCancel(e) {
e.preventDefault();
this.props.onCancel();
}
render() {
const { formatMessage } = this.props.intl;
const methods = {'email': formatMessage(messages.email), 'tel': formatMessage(messages.phone)};
@@ -72,6 +81,9 @@ class ValidationView extends React.PureComponent {
<button className="blue" onClick={this.handleSubmit}>
<FormattedMessage id="button_confirm" defaultMessage="Confirm" description="Button [Confirm]" />
</button>
<button className="white" onClick={this.handleCancel}>
<FormattedMessage id="button_cancel" />
</button>
</div>
</div>
);