Skip to content

Commit

Permalink
fix: add option role into allOptions selector (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
luistak authored Oct 21, 2020
1 parent 3ffff43 commit c7e2835
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/select-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function selectOptionsBase(newValue, select, values, init) {
)
}
const valArray = Array.isArray(values) ? values : [values]
const allOptions = Array.from(select.querySelectorAll('option'))
const allOptions = Array.from(
select.querySelectorAll('option, [role="option"]'),
)
const selectedOptions = valArray
.map(val => {
if (allOptions.includes(val)) {
Expand Down

0 comments on commit c7e2835

Please sign in to comment.