1

I am trying to create a dynamic custom layout for the lightning community where I can set rows and columns of the layout. I tried creating layout by implementing force community: layout but I didn't find a way where I can get input for a number of rows and columns also I am not able to create attributes of type Aura.Component[] dynamically.

Thanks in advance.

0

Welcome to SF.SE. The general approach to building a component like this would be to create a number of components that incrementally build the functionality needed for the final component. At a minimum, you'd want a "row" component, a "column" component, a table, and most likely a grid component plus a container to hold everything. You'll want to define attributes for rows and columns. You'd need a means of handling your data as an array to send it into each row and column.

I hope this helps you get started. In the future, when you post a question like this, please include any code you've written and where you're stuck. Questions posted without code typically get closed. Please take the time to visit the [Help] and read How do I ask a good question.

| improve this answer | |
  • thank you for your reply but it didn't worked as if we create a new component inside layout we cant drag and drop another component inside it. I need a approach where i can dynamically create aura attributes. – Vaibhav Jadhav Sep 5 '17 at 6:37

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.