<< Using component.find in Salesforce Lightning Components | Home | Salesforce week 25-27 and finishing this weekly thing... >>

Salesforce Lightning Component API change

As we get closer to Summer 17 we start using difference versions across production instances and sandboxes. This of course also leads to opportunities for differences in API's... I just found one such difference as I'd been developing some Lightning components on Summer 17 and got errors when trying to run them on Spring 17. In Summer 17 you can do the following in a client-side event handler to get the DOM element of the source component:

   react: function(component, event, helper) {
      const elem = event.getSource().getElement();
This doesn't work in Spring 17 as the getElement method is not available. So find another way to accomplish whatever you are doing there...

Avatar: René Winkelmeyer

Re: Salesforce Lightning Component API change

 Only 4 weeks to go... ;-)

Add a comment Send a TrackBack