mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 03:05:51 +03:00
Merge pull request #236 from matrix-org/rav/search_pagination_spinner
Show a spinner when we back-paginate search results
This commit is contained in:
commit
c31fbf1214
1 changed files with 8 additions and 0 deletions
|
@ -739,6 +739,8 @@ module.exports = React.createClass({
|
|||
getSearchResultTiles: function() {
|
||||
var EventTile = sdk.getComponent('rooms.EventTile');
|
||||
var SearchResultTile = sdk.getComponent('rooms.SearchResultTile');
|
||||
var Spinner = sdk.getComponent("elements.Spinner");
|
||||
|
||||
var cli = MatrixClientPeg.get();
|
||||
|
||||
// XXX: todo: merge overlapping results somehow?
|
||||
|
@ -751,6 +753,12 @@ module.exports = React.createClass({
|
|||
|
||||
var ret = [];
|
||||
|
||||
if (this.state.searchInProgress) {
|
||||
ret.push(<li key="search-spinner">
|
||||
<Spinner />
|
||||
</li>);
|
||||
}
|
||||
|
||||
if (!this.state.searchResults.next_batch) {
|
||||
if (this.state.searchResults.results.length == 0) {
|
||||
ret.push(<li key="search-top-marker">
|
||||
|
|
Loading…
Reference in a new issue