Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Select] Can't attach events to select's options when there are more than 2 selects #2333

Open
jpelay opened this issue Mar 21, 2024 · 1 comment

Comments

@jpelay
Copy link

jpelay commented Mar 21, 2024

I have two selects in one page and I want to attach an event handler to do something when they are selected, but there's no way to target each one of these divs, because as far as I can see there's no id or name I can know in advance.

@iprzybysz
Copy link
Contributor

Hi @jpelay, check out our Select API documentation and Events section. There are available events in the Select component. If you want to do something when the option is selected, just get a select element by id and add an event listener on it - if there is no id, just add it to the select tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants