0

I have a lightning component with a child component. I'm passing an array of object to the child. It seemed that there was an attribute that I could set to invoke a function once the child attribute was loaded. I thought is was named something on the line of "?afterloading?" or sort. I can't seem to find documentation anymore. I'm using a change handler to handle the situation but this is for a piece of mind.

I thought I could do something as follow:

<aura:component>
<aura:attribute name="foo" type="object[]" afterloading="{!c.dosomething}">
</aura:component>
3
  • "I can't seem to find documentation anymore" ?
    – glls
    Commented May 29, 2018 at 20:06
  • can't find in the documentation. I am most def need more coffee. I am confusing with afterscriptsloaded.
    – d.klauss
    Commented May 29, 2018 at 20:12
  • I think a changehandler is totally the right way to do it - it's not a workaround Commented May 29, 2018 at 20:15

1 Answer 1

2

The only attributes for attributes are listed here. They are:

  • access
  • name
  • type
  • default
  • required
  • description

And no, you're not missing anything; you'd use an aura:valueChange listener, as you're doing, to listen for changes. You were most likely thinking about afterScriptsLoaded on the ltng:require component, which would be used to call some initialization script after loading external libraries.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .