1

In my code, I am getting a list of Object from apex controller, and populating the same into an aura attribute paginationList. On the below line, I am getting the error: component.set('v.paginationList', paginationList);

Here is the helper code:

action.setCallback(this, function(a) {
var result = a.getReturnValue();
var paginationList = [];
if(typeof result!= 'undefined'){
   for(var i=0; i< pageLimit; i++)
   {
       if(i<result.length)paginationList.push(result[i]);    
   }
}
component.set('v.paginationList', paginationList);
}

On going further into console logs, I could trace the error to the method clearUnrenderedBody, which is internally invoked on component.set call:

if(cleanedCmps) {

         var owner = component.$getOwner$();
         $A.$warning$(["[Performance degradation] ", "markup://aura:iteration [id:" + component.$getGlobalId$() + "] ", "in ", owner.$getType$() + ' ["' + owner.$getGlobalId$() + '"] ', "had multiple items set in the same Aura cycle.\n", "More info: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/perf_warnings_iteration.htm\n", "Component hierarchy: " + $A["util"].$getComponentHierarchy$(owner)].join(""))
    }

Here it is not getting the owner, and so gives the error. Has anybody encountered this kind of issue, and got any resolution? Any help is appreciated.

  • Any idea, why aura:if is mentioned in the error message? – Basti Nov 6 '17 at 8:16
  • It seems, on setting the component attribute, the component is rendering again where it iterates over the paginationList. Within this iteration, there are some aura:if elements. I also checked this link developer.salesforce.com/docs/atlas.en-us.lightning.meta/… but doesn't seem to help. – Aakriti Nov 6 '17 at 8:35
  • May you also add that part of code, where this happens? – Basti Nov 6 '17 at 8:37
  • did you check, that the list isn't empty? – Basti Nov 6 '17 at 8:41
  • yes, i checked the list is not empty. And there are quite a few aura:if statements, though am not getting where the error is actually coming from. – Aakriti Nov 6 '17 at 8:48

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.