2

I have a parent component that dynamically creates child components based on the state of the page. When I make a change to the child component, the page does not create the new version of the child component.

If I add the component to the parent component (not dynamically) it will create the new version non-dynamically, and the old version dynamically.

I have tried:

  • Disabling Enable secure and persistent browser caching to improve performance in setup
  • Adding aura:dependency tags to the parent component
  • Clearing my browser Cache and reloading
  • Loading in a private tab

The problem persists until usually the next day, when it will then create the updated version.

Parent Component

<aura:component >
    <aura:dependency resource="markup://c:ChildComponent" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <!-- This part will generate the old component -->
    {!v.body}

    <!-- This Part will generate the updated Component -->
    <c:ChildComponent/>
</aura:component>

Parent Controller

({
    doInit : function(component, event, helper) {
        var attributes = {};
        // set the attributes for the component

        $A.createComponent(
            'c:ChildComponent',
            attributes,
            function(cmp, status, message) {
                if(status === 'SUCCESS') {
                    component.set('v.body', cmp);
                }
            }
        );
    }
})

Child Component

<aura:component >
    This should show up. But if I change this, the changes won't show up for hours.
</aura:component>

My work around to continue timely development is to make my changes and verify them by not dynamically creating them, then when they are complete to change it to the dynamic creation.

  • What browser are you using? Change to Chrome. – Keith C Aug 23 '17 at 7:16
  • I use Chrome by default, and I have tried it in Firefox and IE, same result. – trankz Aug 24 '17 at 12:38
  • Weird I have never had a problem with this. Have you seen salesforce.stackexchange.com/questions/134111/…? – Keith C Aug 24 '17 at 13:42
  • Yes, thank you, that is where I found out to try disabling the "secure and persistent browser caching" in the settings. I can confirm I still experience the same issue described in that question for hard typed components, and for dynamicly created components I have the further issue I described. – trankz Aug 25 '17 at 14:13

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.