0

Is it possible to re-render an inputField in Lightning so that it re-fetches its values from the server (how we used to do it with VF)?

I am well aware of the limitations associated with picklists and in particular dependent picklists, so I am trying to see if it is possible to fetch the corresponding options by re-rendering the field (as opposed to describing the field, getting the values, and setting them on the page).

One idea I had was to use the valueChange event on the master picklist:

<aura:handler name="change" value="{!v.record.MasterList__c}" action="{!c.rerenderPage}"/>

However I am not sure what to write for the action handler.

  • WIth the re-render you mean? I am not sure if I am on the right path at all here, but I have a valueChange handler that I don't know what to do with. I know how to assign values to my DOM elements when a change occurs, but I don't know how to re-render a field on the page so that it dynamically fetches its values from the server. – Mossi2 Jul 20 '17 at 22:36
  • Here is the main thing, @Mossi2, most of us here won't just write code from scratch for you. However, If you have an idea and get stuck, post your progress and we'll likely get you moving. – Sebastian Kessel Jul 20 '17 at 22:39
  • @SebastianKessel I am not sure if I needed a code from scratch. What I was hoping was "hey what you are trying to do is not possible because of X" or "this is possible; you just need to do Y and the fields on the record will get re-evaluated and reset" – Mossi2 Jul 20 '17 at 22:59

Your Answer

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

Browse other questions tagged or ask your own question.