I don't seem to be able to find how to do this anywhere, I've tried adding a new aui-option to the datalist but even though the new option does appear on the list it won't be there when you search for it by writing on the input field.
Is there some way to do this?
There's no way to add a new option programatically (yet). You could use the async version and back it with a rest resource which could provide more results.
Alternatively you can add the "can-create-values" attribute to the element, and then set it's value to something. It will appear as a special option in the list with "(new value)" after it.
I may be misunderstanding the question here, but a single-select list's options are determined by data in the database. Aui has nothing to do with that, it's for the front-end. They're not related to each other.
I'll try to explain here, I'm following the first example in (https://docs.atlassian.com/aui/latest/docs/single-select.html), the synchronous one. When I write the options on the template like that it works fine, but I want to be able to add or remove options afterwards since they should change depending on what the user chooses on another field.
We're looking for participants for another workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sh...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs