-
Notifications
You must be signed in to change notification settings - Fork 345
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
Combobox does not fire an "on change" #3095
Comments
Please provide the URL of the page about which you are inquiring. |
The ARIA Authoring Practices (APG) Task Force just discussed The full IRC log of that discussion<jugglinmike> Topic: Combobox change event question<jugglinmike> github: https://github.com//issues/3095 <jugglinmike> Adam_Page_: If I'm understanding correctly, the reporter is using the combobox pattern, but they want an "onchange" event that they would get with a standard "select" element <jugglinmike> Matt_King: But we would only do that if we were writing the combobox code to be reusable <jugglinmike> Adam_Page_: Right--if, for instance, we wanted our own example to take advantage of such an event <jugglinmike> Matt_King_: That was my gut instinct on how to respond <jugglinmike> Zakim, end the meeting |
@mcking65 - I can provide the source link: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/ There is no "on change" method for this component... However, this being said, I think I have found a work around. In my instance, I loop through all of my select elements and am using Javascript to create the options array that this plugin needs to initialize (along with building the necessary parent HTML). From there, I am extending the "selectOption" method where I create an "on change" event listener for my hidden select element. Below is a dev URL where you can see my instances: https://moveodev.com/delta-dental/components/styleguide/#combobox Here is some code to show you how I have accomplished this:
|
I am attempting to add a custom "on change" event listener to this component and am noticing that there is nothing that triggers a change event after the component is updated. I do see that the hidden select element does change, but nothing is triggering an event. Maybe I am missing something in the documentation, but is there a way to fire a callback function after the component value is updated?
The text was updated successfully, but these errors were encountered: