refactoring due to facebook/react/pull/15047

This commit is contained in:
or-else
2019-08-15 10:30:29 +03:00
parent f1744c3f69
commit 0217d84721
23 changed files with 192 additions and 161 deletions
+3 -2
View File
@@ -9,7 +9,8 @@ export default class Chip extends React.PureComponent {
this.handleCancel = this.handleCancel.bind(this);
}
handleCancel() {
handleCancel(e) {
e.preventDefault();
this.props.onCancel(this.props.topic, this.props.index);
}
@@ -29,7 +30,7 @@ export default class Chip extends React.PureComponent {
}
<span>{title}</span>
{this.props.onCancel && !this.props.required ?
<a href="javascript:;" onClick={this.handleCancel} >&times;</a>
<a href="#" onClick={this.handleCancel} >&times;</a>
: <span className="spacer" />}
</div>
);