function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lavanya mulpurilavanya mulpuri 

Invalid <aura:attribute> type: Wrapperobj[]

Hi All,

I'm unable to save my Lightning Component, becase it keeps throwing this error Invalid <aura:attribute> type: Wrapperobj[]

Attribute declaration: 
 <aura:attribute name="contactList" type="SearchLeads.Wrapperobj[]" />
Class name : SearchLeads
Wrapper class name : Wrapperobj

I'm facing this issue, after my org got updated to SPRING 18

Thanks in advance!

Best Answer chosen by lavanya mulpuri
lavanya mulpurilavanya mulpuri
Use String[] as type

All Answers


Please change it to WrapperClass[]lightning do not refer Class custom wrapper classes. 

Hope this will solve your problem.

Skype: gaurav62990
Takes Freelance Task
hi lavanya,
   if your org have custom namespace then you got this error, this is a known issue :

the workaround is cut your wrapper(child) class from main class and create new fresh wrapper class and then use direct wrapper class name

<aura:attribute name="tlist" type="childClass1[]"/>

i hope it helps you.
      Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
lavanya mulpurilavanya mulpuri
Use String[] as type
This was selected as the best answer
Saket Ranjan 3Saket Ranjan 3
you might have kept it inside <form> your code </form> because of which this error might be occurring .