mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 02:35:48 +03:00
update the UI whilst searching
This commit is contained in:
parent
77464c669f
commit
f38c71d34b
1 changed files with 9 additions and 1 deletions
|
@ -431,6 +431,10 @@ module.exports = React.createClass({
|
|||
}
|
||||
|
||||
var self = this;
|
||||
self.setState({
|
||||
searchInProgress: true
|
||||
});
|
||||
|
||||
MatrixClientPeg.get().search({
|
||||
body: {
|
||||
search_categories: {
|
||||
|
@ -484,6 +488,10 @@ module.exports = React.createClass({
|
|||
title: "Search failed",
|
||||
description: error.toString()
|
||||
});
|
||||
}).finally(function() {
|
||||
self.setState({
|
||||
searchInProgress: false
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -951,7 +959,7 @@ module.exports = React.createClass({
|
|||
aux = <Loader/>;
|
||||
}
|
||||
else if (this.state.searching) {
|
||||
aux = <SearchBar ref="search_bar" onCancelClick={this.onCancelClick} onSearch={this.onSearch}/>;
|
||||
aux = <SearchBar ref="search_bar" searchInProgress={this.state.searchInProgress } onCancelClick={this.onCancelClick} onSearch={this.onSearch}/>;
|
||||
}
|
||||
|
||||
var conferenceCallNotification = null;
|
||||
|
|
Loading…
Reference in a new issue