mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 12:13:58 -06:00
FIX: on enter we would double search on full page search
This commit is contained in:
parent
5eb1fb3bfd
commit
5ed7663a63
@ -64,6 +64,11 @@ export default Ember.Controller.extend({
|
||||
canBulkSelect: Em.computed.alias('currentUser.staff'),
|
||||
|
||||
search(){
|
||||
if (this._searching) {
|
||||
return;
|
||||
}
|
||||
this._searching = true;
|
||||
|
||||
const router = Discourse.__container__.lookup('router:main');
|
||||
|
||||
this.set("q", this.get("searchTerm"));
|
||||
@ -85,7 +90,7 @@ export default Ember.Controller.extend({
|
||||
const model = translateResults(results) || {};
|
||||
router.transientCache('lastSearch', { searchKey, model }, 5);
|
||||
this.set("model", model);
|
||||
});
|
||||
}).finally(() => {this._searching = false});
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
Loading…
Reference in New Issue
Block a user