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 21, 2020
1 parent 8a5affa commit adf3a17
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 adf3a17

Please sign in to comment.