1

Look to this video which tried to select an option and sometimes is happening and others not. Really weird behaviour.

Booking Mode Select (starting at 0:22 sec): http://recordit.co/lnma8c6Okb

 <lightning:combobox name="bookingMode" label="Booking Mode"
                          class="slds-combobox-brand"
                          placeholder="Select an option"
                          value="{!v.bookingMode}"
                          required="true"
                          onchange="{!c.handleBookingModeSelected}"
                          options="{!v.bookingModeList}"/>
  • 1
    is it happening to anyone else? – danigonlinea Jul 17 '18 at 11:37
  • 2
    post handleBookingModeSelected code – Pavel Slepiankou Jul 17 '18 at 11:50
0

I have found the origin of the problem.

It was that I had a code which let me clear the component if I click the option which is already selected, but onchange is not triggered in this case, so there is no way at the moment to do that.

Removing that piece of code which I reset the option select resolves this issue.

handleBookingModeSelected: function (cmp, event, helper) {
// Get the old value attribute from the previous selection
if (cmp.get('v.bookingMode') === cmp.get('v.bookingModeOld')) {
  cmp.set('v.bookingMode', '');
  cmp.set('v.bookingModeOld', '');

} else {
  cmp.set('v.bookingModeOld', event.getParam("value")); 
} 
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.