canonical / react-components

A set of components based on Vanilla Framework
https://canonical.github.io/react-components
95 stars 51 forks source link

Ability to have nested tables while using ModularTable #991

Open moisesbenzan opened 10 months ago

moisesbenzan commented 10 months ago

It would be great if there was a way to achieve nested tables while using the ModularTable component. One use case that comes to mind is displaying several configuration values under one item, for instance:

testcase1
    bug1 information
    bug 2 information
-----------------------------------------
testcase2
   bug3 information

---------------------------------------
testcase3
--------------------------------------
testcase4

I could provide a rough wire-frame of the UI to achieve.

Thanks in advance!

huwshimi commented 10 months ago

Hi @moisesbenzan, ModularTable has an option to provide child rows through the subRows property. There's an example here: https://canonical.github.io/react-components/?path=/docs/modulartable--default-story#subrows.

Will that give you what you need?