aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/components/input-with-autocomplete.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/app/components/input-with-autocomplete.js')
-rw-r--r--javascript/app/components/input-with-autocomplete.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/javascript/app/components/input-with-autocomplete.js b/javascript/app/components/input-with-autocomplete.js
index 2b09ea4..34abe7a 100644
--- a/javascript/app/components/input-with-autocomplete.js
+++ b/javascript/app/components/input-with-autocomplete.js
@@ -97,10 +97,15 @@ export default Ember.Component.extend({
});
},
showAutocompleteList() {
- this.$autocompleteContainer.css({
- "display":"block"
- });
+ if(this.get('query') !== "") {
+ this.$autocompleteContainer.css({
+ "display":"block"
+ });
+ }
},
+ searchUrlObserver : Ember.observer('createSearchUrlFunction',function() {
+ this.notifyPropertyChange('query');
+ }),
queryObserver : Ember.observer("query",function() {
if(this.get('query')) {
const perPage = this.get('maxItems') ? this.get('maxItems') : 10;