2

Is it possible to insert a lazy loading into a picklist : so while the list is loading, the rest of my page is displayed. For now, the list I have to display is so long (due to the request I think) that I have to wait for it to be loaded before the rest of my page is displayed.

It is a lightning component, and I saw there is an aura:waiting but I absolutly don't know how to use it, especially in the picklist.

So if you have any idea about it, or even an example of how to use this (even if it's not into a picklist), thank you.

4

You could put the request for the data of the picklist into the Renderer. Make an afterRender method that populates the picklist.

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_renderers.htm#afterRender_DOM

I would put the logic into the Helper and just have the afterRender call your helper method.

({
  afterRender: function(cmp, helper) {
      this.superAfterRender();
      helper.loadPicklist(cmp);
  }
})
| improve this answer | |

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.