Skip to content

Commit

Permalink
fix: call default onChange and update input event with new default props
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosvega91 committed Jun 20, 2020
1 parent e494e34 commit 7cdce7f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/select-options.js
Expand Up @@ -60,8 +60,16 @@ function selectOptionsBase(newValue, select, values, init) {

function selectOption(option) {
option.selected = newValue
fireEvent(select, createEvent('input', select, init))
fireEvent(select, createEvent('change', select, init))
fireEvent(
select,
createEvent('input', select, {
bubbles: true,
cancelable: false,
composed: true,
...init,
}),
)
fireEvent.change(select, init)
}
}

Expand Down

0 comments on commit 7cdce7f

Please sign in to comment.