I would like to add an expandable/collapsible button beside each row of a table. Upon clicking the button, a new row will be displayed inside the particular row,and on clicking the button again the row will collapse. Please suggest the way I can create a function that will solve the purpose.

closed as off-topic by glls, battery.cord, David Reed, Oleksandr Berehovskyi, Saariko Sep 20 '18 at 11:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – battery.cord, David Reed, Oleksandr Berehovskyi
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What have you tried so far? Where does the actual issue lie? This forum lends a helping hand in solving your legit problems and not do your work for you. – Lightning Evangelist Sep 19 '18 at 16:28

You can use lightning:treeGrid base component to achieve this behavior. Refer this link

Not the answer you're looking for? Browse other questions tagged or ask your own question.