slim-select
slim-select copied to clipboard
The change event triggered on the original select doesn't bubble
There was already an issue for bubbles created here
but in the current version the event is not with bubbles again:
https://github.com/brianvoe/slim-select/blob/master/src/slim-select/select.ts#L300
I supposed it should be
this.select.dispatchEvent(new Event('change'), { bubbles: true })
I'm affected by this as well and have created #547 based on your suggestion. It does indeed fix it for me.
I dont mind adding the pr I just need a test added for it.
@brianvoe I'm trying to write tests for this and while doing so I found out that my original PR contained an error. Instead of this:
this.select.dispatchEvent(new Event('change'), { bubbles: true })
it should have been:
this.select.dispatchEvent(new Event('change', { bubbles: true }))
Sorry about that, I messed up in the Github web ui I guess.
Also, I don't think this fixes the case where a users selects an item. Can you help me find where the original change event is created for when a user selects an item? I'll then create a PR with tests for it.
no worries. I made the fix for you