We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set defaultIndex to 0, the panel will not unfold. but rest of the index, it works properly.
My code here (v0.58.0)
import React, { Component } from 'react' import { Accordion } from 'semantic-ui-react' import faker from 'faker' import _ from 'lodash' const panels = _.times(3, () => ({ title: faker.lorem.sentence(), content: faker.lorem.paragraphs(), })) export default class AccordionPanelsPropExample extends Component { render() { return ( // at index 0 not working, but rest index working fine. 1 or 2 <Accordion defaultActiveIndex={0} panels={panels} /> ) } }
The text was updated successfully, but these errors were encountered:
#761
Sorry, something went wrong.
Duplicate, see above.
Ah, there is a nuance here I've overlooked. The 0 default case is not working.
0
i used this for reactBoostrap accordion i think you can use something similar in your defaultActiveIndex={0} parameter
<Card key={item.id}> <Card.Header> <Accordion.Toggle as={Button} variant="link" eventKey={index === 0 ? '0' : index}> {item.title} </Accordion.Toggle> </Card.Header> <Accordion.Collapse eventKey={index === 0 ? '0' : index}> <Card.Body> CARD BODY </Card.Body> </Accordion.Collapse> </Card>
Successfully merging a pull request may close this issue.
set defaultIndex to 0, the panel will not unfold. but rest of the index, it works properly.
My code here (v0.58.0)
The text was updated successfully, but these errors were encountered: