naoufal / react-native-accordion

An Accordion Component for React Native
https://www.npmjs.com/package/react-native-accordion
437 stars 101 forks source link

how to control accordion programmatically??? #50

Open yogeshmoradiya121 opened 7 years ago

yogeshmoradiya121 commented 7 years ago

i wan to know how i can use methods like open,close and toggle????

ercpereda commented 6 years ago
<Accordion ref="MyAccordion" />
........
this.refs.MyAccordion.open()
GustavoHGS commented 6 years ago

Not working using ref...

ercpereda commented 6 years ago

@GustavoHGS, try this 👇

<Accordion ref={accordion => this.accordion = accordion} />
.......
this.accordion.open()