I want to assign current selected option which is '0' and I want to assign it to '2' when URL is change. How can I do that? Please help.
Example.cmp
<div class="slds-col slds-size_1-of-5 slds-grid--vertical-align-start">
<ui:inputSelect aura:id="mySelect" change="{!c.onChangeFunction}">
<aura:iteration items="{!v.options}" var="item" >
<ui:inputSelectOption text="{!item.label}" value="{!item.value}"/>
</aura:iteration>
</ui:inputSelect>
</div>
Example.js
component.set("v.options", [
{'label': 'Default', 'value': 0, selected: "true"},
{'label':'Yes','value':1},
{'label':'No','value':2},]);
Example.helper
handleEvent :function(component,event,helper){
var sPageURL = decodeURIComponent(window.location); //get params from URL
console.log('sPageURL' + sPageURL);
const queryString = window.location.search;
var option = component.find("mySelect").get("v.value"); //show undefined
},