Display multiple items in a map when a Collapsible is clicked
cardinalpipkin opened this issue · comments
cardinalpipkin commented
User clicks an item in the collapsible and it calls data that populates a mapped list:
{items.map((element, i) => (
<Collapsible trigger={element.Title} key={i} onOpening={() => getAssociatedSitesForCollapsible(element)} >
{associatedSites.length > 0 ? associatedSites.map((associatedSite: any) => {
<p>{associatedSite.siteUrl}</p>
}) : null}
</Collapsible>
))}
It's not doing anything - I've checked what props I'm passing and it's populating state for the associatedSites state.
Not a bug - but I just don't know how to do it with Collapsible.
cardinalpipkin commented
Doh - wasn't returning the map.