Thanks for your answer, but this doesn't seem to be working.
When I write your suggested line:
and then directly try :
I get "" as a result, and the Select box is still empty.
Here is my HTML for more info:
placeholder="Select a Type"
value="type to search types">
And thank you for your continuing support
I tried your suggestion (using the JQuery val('value').trigger('change') but again it is not working. I think this would work fine with preloaded options, but not when using asynchronous loading with AJAX.
We were able to grab and set the value of the "input" inside the select, but again it's value will remain "" (no value) and the specified option will not be selected.
If it's not too much to ask, do you have a working sample that you can provide?
Thanks again and regards,
To give you a better idea, here are the details of our tests on JS Bin (using the sample provided on https://docs.atlassian.com/aui/latest/docs/single-select.html)
Fake Rest API using: http://www.mocky.io/
Sample API: http://www.mocky.io/v2/57d01a871000008c00208c9a
JS BIN Code:
<!-- External dependencies -->
<link rel="stylesheet" type="text/css" href="//aui-cdn.atlassian.com/aui-adg/6.0.0/css/aui.css"/>
<link rel="stylesheet" type="text/css" href="//aui-cdn.atlassian.com/aui-adg/6.0.0/css/aui-experimental.css"/>
<!-- / External dependencies -->
<aui-label for="async-product-single-select">Choose your product asynchronously (you need to type to initiate a search):</aui-label>
placeholder="Select a product"
value="type to trigger async">
success : function (response)
//$("#async-product-single-select").val("1"); to select option value 1
$('select').select2().select2('val', $('.select2 option:eq(1)').val()); to select first option in list
Hello Community, Today we are going to talk about the three Scrum Roles. There is the Development Team, the Scrum Master and the Product Owner. In my opinion these three are all really impo...
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