From 83c92bf7561a9a4d15c465f566ce95fc7707c007 Mon Sep 17 00:00:00 2001 From: Naoufal Kadhom Date: Sun, 24 May 2015 21:35:19 -0400 Subject: [PATCH] hide accordion overflow --- src/index.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 6022d6c..285c599 100644 --- a/src/index.js +++ b/src/index.js @@ -41,7 +41,7 @@ var Accordion = React.createClass({ }; }, - toggleAccordion() { + _toggleAccordion() { this.state.is_visible = !this.state.is_visible; this.tweenState('height', { @@ -51,7 +51,7 @@ var Accordion = React.createClass({ }); }, - getContentHeight() { + _getContentHeight() { this.refs.AccordionContent.measure((ox, oy, width, height, px, py) => { // Sets content height in state this.setState({content_height: height}); @@ -62,16 +62,20 @@ var Accordion = React.createClass({ // Gets content height when component mounts // without setTimeout, measure returns 0 for every value. // See https://github.com/facebook/react-native/issues/953 - setTimeout(this.getContentHeight); + setTimeout(this._getContentHeight); }, render() { return ( /*jshint ignore:start */ - +