Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patrinhani-ciandt committed Feb 22, 2016
1 parent f4aef52 commit 6a3a265
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paper-input-autocomplete-chips",
"version": "0.24.1",
"version": "0.24.2",
"authors": [
"Vinicius Patrinhani <[email protected]>"
],
Expand Down
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<paper-input-autocomplete-chips
id="myAutoCompletePOCUnknownItems"

remote-url="http://www.mocky.io/v2/56b0dda4120000ec18670762"
label="Invite people"
on-selected-objects-changed="_allowUnknown_onSelectedObjectsChanged"
on-response-treatment="XHRResponseTreatment"
Expand Down Expand Up @@ -203,7 +203,7 @@ <h1>[email protected]</h1>

app.onSwitchSuggestionPanelPosition = function () {
var $el = document.getElementById('myAutoCompletePOC');
console.debug($el.suggestionsPosition);
//console.debug($el.suggestionsPosition);
$el.suggestionsPosition = ($el.suggestionsPosition === 'top') ? 'bottom' : 'top';
};

Expand Down
9 changes: 6 additions & 3 deletions input-autocomplete-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@
var suggestionFocusedItem = this._suggestionsFocusedItem;

if ((suggestionFocusedItem) || (!this._inputElement.invalid )) {
this._setSelectedItem(suggestionFocusedItem);
if (suggestionFocusedItem) {
this._setSelectedItem(suggestionFocusedItem);
} else {
this._setSelectedItem();
}
}else{
this.setSuggestions([]);
}
Expand All @@ -295,10 +299,9 @@
},

_setSelectedItem: function (selectedItemElement) {
console.log('[_setSelectedItem]');
var suggestionsMenu = this._menuElement;

if (selectedItemElement) {
if (selectedItemElement !== undefined) {
if (this.selectedItem !== selectedItemElement) {

var selectedObject = null;
Expand Down

0 comments on commit 6a3a265

Please sign in to comment.