naoufal / react-native-accordion

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

Public methods for open/close/toggle #2

Closed alexrabarts closed 9 years ago

alexrabarts commented 9 years ago

This pull request adds public methods to allow for programmatic control over the state of the accordion. e.g. to manually open an accordion:

<Accordion header={header} content={content} ref="myAccordion" />

this.refs.myAccordion.open();

The pull request provides methods for open, close and toggle.

naoufal commented 9 years ago

@alexrabarts can you leave a PR description when the change is finished?

I'll review after that. Thanks!

alexrabarts commented 9 years ago

Done. Thanks.

naoufal commented 9 years ago

@alexrabarts Sorry about the delay on this—I was sure I had already merged it.

This change looks good. :+1:

naoufal commented 9 years ago

@alexrabarts published on npm.

alexrabarts commented 9 years ago

Great, thank you.