You need to sign in to do that
Don't have an account?
Lightning select onchange not triggering
Beating my head against the wall and hoping someone can point out what I'm missing. I have a basic Lightning component with a drop-down. When that drop-down changes, I'd like the controller to make a second field visible through an aura if. But I can't even get the selection onchange to trigger.
Component is basically:
<aura:attribute name="rType" type="string"/>
<lightning:select name="rType" label="Record Type" value="{!v.rType}" required="true" onchange="{!c.syncSelection}">
With controller:
syncSelection: function (component, event, helper) {
console.log("this worked");
controller code
if you are still getting the issue, please share complete .cmp and controller code related to the dropdown
All Answers
controller code
if you are still getting the issue, please share complete .cmp and controller code related to the dropdown
Please folllow below url for your solution approach:-
https://www.biswajeetsamal.com/blog/tag/lightningselect/
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
Thank you Naveen - it led me in the right direction, which was my additional line under syncselection that seemed to be causing the function to fail.
var activeSelect = event.getSource().get("v.value");