Hi ,
I'm trying to add options to https://docs.atlassian.com/aui/7.8.0/docs/dropdown.html after it has been initialized. But it doesent work as it seems like it just can process/display options that were defined before page load. Could you please advice if there is a way to dinamically add options to aui dropdown (specifically trying to implement aui-item-checkbox).
Thanks,
Glib
Hello in the documentation it shows the ability to use an Ajax Async drop down and it looks to support checbox. If you are fortunate enough to have a REST service that is able to return the right data to populate a checkbox drop down it should work for you. You might need to write a REST plugin in the product you want to retrieve the data from. I have done something similar using the AUI single select component and it works well. The single select is good as you can type text in and use the related src parameter that is passed into the REST service to return back data that is relevant to the data entered into the field. However that does not support checbox.
An alternative would be to write some javascript or jquery in the browser to change the state of the drop down.
Does the checkbox state have to change depending on something the user has done in the browser?
Hi @David Gardner,
Thank you for your reply. Async option you have suggested would work only on page load afaik. The problem is that I render select options based on the rest response after selecting an option in some other dropdown and these options should be refreshed after every selection in dropdown 1. Currently I'm using regular <select> and it works fine, but I'm trying to enhance it with checkboxes and was looking at AUI components.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.