Closed techmentormaria closed 8 years ago
Thanks for taking the time to submit a PR @mhollweck. I'm always happy to see people contribute. :smile:
Closing due to inactivity.
@naoufal - sorry to be a trouble, but can we get something in the core? You've closed 4 in favor of 11. But you've closed 11 due to inactivity. In the meantime I'm just extending your class and adding a componentWillReceiveProps function:
var Accordion = require('react-native-accordion');
Accordion.prototype.componentWillReceiveProps = function(nextProps) {
if(!this.state.is_visible)
{
setTimeout(this._getContentHeight);
}
};
module.exports = Accordion;
If we don't check the is_visible state, then we can't close the item, because on each new prop we'll update the height...
Having the Accordion automatically resize is important when you are dynamically adding items to the content.
@compojoom you're right. I haven't been around as much as I would have liked to. At the same time, it's difficult to move a an Issue/PR along without both parties actively moving it forward.
That said, this repo deserves more attention and collaborators. I'd be happy to make you one if you're up for it.
The other pull request didn't work for me, so I created this one. Would be great if you include that in the basic project.
-M