Skip to content

Commit

Permalink
CustomDropdown class: fixed item selection (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpietro authored and Łukasz Serwatka committed Sep 17, 2018
1 parent b72c51c commit 0f5564c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}

[selectFirstItem]() {
const firstItem = this.itemsContainer.querySelector(SELECTOR_ITEM);
const firstItem = this.itemsContainer.querySelector(`${SELECTOR_ITEM}:not([disabled])`);

firstItem.classList.add(CLASS_ITEM_SELECTED);

Expand Down Expand Up @@ -130,7 +130,7 @@

this.container.querySelector(SELECTOR_SELECTION_INFO).addEventListener('click', this[onInputClick], false);
this.itemsContainer
.querySelectorAll(SELECTOR_ITEM)
.querySelectorAll(`${SELECTOR_ITEM}:not([disabled])`)
.forEach((option) => option.addEventListener('click', this[onOptionClick], false));
}
}
Expand Down

0 comments on commit 0f5564c

Please sign in to comment.