Closed progamr closed 5 years ago
<Accordion style={{marginLeft: 15, marginRight: 15}} sections={SECTIONS} renderSectionTitle={this._renderSectionTitle} renderHeader={this._renderHeader} renderContent={this._renderContent} underlayColor={'transparent'} />
` _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 (
); }`
Can you create an example on https://snack.expo.io that reproduces this?
Closing as inactive. Feel free to message or create a new issue if this is still a concern.
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} ); }
and this is the render item of FlatList if needed `renderTopicComment({item}) { return (