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
@@ -36,7 +36,8 @@ export default class SearchContacts extends React.PureComponent {
this.props.onSearchContacts(query.length > 0 ? query : Tinode.DEL_CHAR);
}
handleClear() {
handleClear(e) {
e.preventDefault();
if (this.state.edited) {
this.props.onSearchContacts(Tinode.DEL_CHAR);
}
@@ -63,7 +64,7 @@ export default class SearchContacts extends React.PureComponent {
value={this.state.search} onChange={this.handleSearchChange}
onKeyDown={this.handleKeyDown} required autoFocus />
}</FormattedMessage>
<a href="javascript:;" onClick={this.handleClear}>
<a href="#" onClick={this.handleClear}>
<i className="material-icons">close</i>
</a>
</div>