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.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/javascript/app/components/input-with-autocomplete.js b/javascript/app/components/input-with-autocomplete.js
index 34abe7a..5960c46 100644
--- a/javascript/app/components/input-with-autocomplete.js
+++ b/javascript/app/components/input-with-autocomplete.js
@@ -1,14 +1,14 @@
import Ember from 'ember';
export default Ember.Component.extend({
- store : Ember.inject.service('store'),
+ store : Ember.inject.service('store'),
highlightedItemIndex: -1,
items : [],
query: null,
didInsertElement() {
const $input = Ember.$(this.element).find(".search-input");
- const $autocompleteContainer = Ember.$(this.element).find(".autocomplete-container");
- this.$input = $input;
- this.$autocompleteContainer = $autocompleteContainer;
+ const $autocompleteContainer = Ember.$(this.element).find(".autocomplete-container");
+ this.$input = $input;
+ this.$autocompleteContainer = $autocompleteContainer;
const width = $input.width() + 300;
$autocompleteContainer.css({
"width" : width+"px",
@@ -23,9 +23,9 @@ export default Ember.Component.extend({
this.onDown();
} else if(e.which === 38) {
this.onUp();
- }
+ }
});
- $input.focusin(() => {
+ $input.focusin(() => {
this.showAutocompleteList();
});
$input.focusout(() => {
@@ -105,7 +105,7 @@ export default Ember.Component.extend({
},
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;