Commit c6837928 authored by Gijs Hendriksen's avatar Gijs Hendriksen
Browse files

Remove search delay in events admin screen

parent b363f36f
......@@ -140,10 +140,7 @@ class SearchHeader extends Component {
updateSearchKey = (searchKey) => {
if (this.state.searchKey !== searchKey) {
this.setState({ searchKey });
clearTimeout(this.searchTimeout);
this.searchTimeout = setTimeout(() => {
this.props.search(searchKey);
}, 500);
this.props.search(searchKey);
}
};
......
......@@ -29,12 +29,19 @@ class MemberListScreen extends Component {
}
};
search = (searchKey) => {
clearTimeout(this.searchTimeout);
this.searchTimeout = setTimeout(() => {
this.props.loadMembers(searchKey);
}, 500);
};
render() {
const header = (
<SearchHeader
title={this.props.t('Member List')}
searchText={this.props.t('Find a member')}
search={key => this.props.loadMembers(key)}
search={this.search}
searchKey={this.props.searchKey}
/>
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment