Trying to get Accordion component to work
See original GitHub issueWhat did you do?
I installed react-foundation using npm.
Then in my component I imported the necessary react-foundation components.
import { Accordion, AccordionItem, AccordionContent, AccordionTitle} from 'react-foundation'
Then I set up my component as shown below (there’s an axios get being called in componentDidMount to set the donors state).
<Accordion>
{this.state.donors.map(function(donor, i) {
return(
<AccordionItem key={donor.title}>
<AccordionTitle>{donor.title}</AccordionTitle>
<AccordionContent>
<div dangerouslySetInnerHTML={{__html: donor.markup}} />
</AccordionContent>
</AccordionItem>
);
})}
</Accordion>
What did you expect to happen?
I expected the accordion to open and collapse when clicking the titles
What actually happened?
Nothing happens when you click the titles. The content is never shown.
What version of this module are you using?
Latest version
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How To Build an Accordion Component with React
We will be creating three components: ... The sections inside of the Accordion component will simply be <div> tags that will receive a...
Read more >How to create an Accordion component in Adapt. - YouTube
DocuSign How It works and How to USE DOCUSIGN in 2022 (Step by Step Tutorial ). Solusign Consulting. Solusign Consulting.
Read more >Creating a Reusable Accordion Component That Works ...
How to make a web component using angular elements which can be used ... a shift from one framework to another or want...
Read more >Accordion Component | Adobe Experience Manager
Use the Add button to open the component selector to choose which component to add as a panel. Once added, an entry is...
Read more >Accordion - Reach UI
The wrapper component for all other accordion components. Each accordion component will consist of accordion items whose buttons are keyboard navigable using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is a rough usage example:
@kbrabrand I agree with the original decision as there are far too many edge-cases to account for.