I am using Accordian from react-bootstrap, I want that the table row can be expanded to view another table, it is working fine but giving me warnings on browser console.
<div className="row me-2 ms-2">
<table className="table accordian-table table header-fixed border mt-2">
<thead>
<tr>
<th width="30%" className="text-center">Col 1</th>
<th width="30%" className="text-center">Col 2</th>
<th width="30%" className="text-center">Col 3</th>
<th width="25px" className="float end"></th>
</tr>
</thead>
<tbody className="scroll">
<Accordion activeKey={activeAccordionKey}
onSelect={(selectedKey) => setActiveAccordionKey(selectedKey)} flush>
{
(items?.length) ?
[...items].map((item, index) => {
return (
<tr key={index} onClick={() => getFlows(item)}>
<Accordion.Item eventKey={index}>
<Accordion.Header className="main-table-content">
<td width="30%" title={item.prop1} className="text-center pt-2">
{item.prop1}
</td>
<td width="30%" title={item.prop2} className="text-center pt-2">
{item.onboardingInfo.prop2}
</td>
<td width="30%" title={item.prop3} className="text-center pt-2">
{item.onboardingInfo.prop3}
</td>
<td width="25px">{" "}</td>
</Accordion.Header>
<Accordion.Body>
<table className="table" onClick={(e) => e.stopPropagation()}>
<thead>
<tr>
<th>Flow Name</th>
<th>Flow Type</th>
<th>Dnid</th>
<th>Ext</th>
<th>Created By</th>
<th>Created On</th>
</tr>
</thead>
<tbody>
{
(selectedItem?.length) ?
[...selectedItem.values()].map((slItem) => {
return (
<tr key={slItem.flowName}>
<td>{slItem.flowName}</td>
<td>{slItem.flowTypeId}</td>
<td>{slItem.dnid}</td>
<td>{slItem.createdBy}</td>
<td>{slItem.createdOn}</td>
</tr>
)
})
: <tr><td>No Configs Available</td></tr>
}
</tbody>
</table>
</Accordion.Body>
</Accordion.Item >
</tr>
)
}) : <tr><td>No ItemsFound</td></tr>
}
</Accordion>
</tbody>
</table>
</div>
It gives me following warning in browser console:
Warning: validateDOMNesting(…): cannot appear as a child of .
Can someone please help me removing this, or any other alternative?