Hello community !
i’m trying to add options to my aui-select
on the click event but the option not showing in the right place in the dom
code snippet :
<aui-select id="select" placeholder="Select a project" >
</aui-select>
</div>
<div class='buttons-container'>
<button class='aui-button aui-button-primary' onclick="myFunction()">Add</button>
</div>
<script type="text/javascript">
function myFunction() {
$('#select').append($('<aui-option>').val('optionValue').text('optionText'));
}
</script>
what i m missing please ?
i appreciate your time , thank you