oblador / react-native-collapsible

Animated collapsible component for React Native, good for accordions, toggles etc
MIT License
2.46k stars 452 forks source link

Unable to expand view in iOS on RN50 (@0.50.4) and react-native-collapsible @0.13.0 if the content is a FlatList #236

Closed progamr closed 5 years ago

progamr commented 6 years ago

This as the accordion

<Accordion style={{marginLeft: 15, marginRight: 15}}  sections={SECTIONS} renderSectionTitle={this._renderSectionTitle} renderHeader={this._renderHeader} renderContent={this._renderContent} underlayColor={'transparent'} />

and this is my three main functions

` _renderSectionTitle(section) { return ( <View style={{flex: 1, height: 40, justifyContent: 'center'}}> <Text style={{marginLeft: 15, fontSize: 16, color: colors.black0}}>{section.title} ); }

_renderHeader(section) {
    return (
        <View style={{}}>
            <Text style={{fontSize: 14, color: colors.gray01, marginLeft: 5}}>{section.header}</Text>
        </View>
    );
}

_renderContent(section) {
    return (
        <FlatList data={this.comments} renderItem={this.renderTopicComment} keyExtractor={(item, index) => index} />
    );
}`

and this is the render item of FlatList if needed `renderTopicComment({item}) { return (

Amr Mohamed {item.comment}
    );
}`
iRoachie commented 6 years ago

Can you create an example on https://snack.expo.io that reproduces this?

iRoachie commented 5 years ago

Closing as inactive. Feel free to message or create a new issue if this is still a concern.