React-native-collapsible: Does the Accordion work with a Touchable Highlight in the renderHeader and renderContent arguments

Created on 15 Jun 2017  路  5Comments  路  Source: oblador/react-native-collapsible

Can't seem to get this working. For example:

<Accordion
sections={SECTIONS}
renderHeader={() =>{
  return (
    <View>
    <TouchableHighlight style={{padding: 5}}
    underlayColor = '#191970'
    >

    <View style = {styles2.row}>
    <Text style = {{color:'#B67075'}}>Hello</Text>
    </View>

    </TouchableHighlight>
    </View>
  );
}}
renderContent={() =>{
  return (
    <View>
    <TouchableHighlight style={{padding: 5}}
    underlayColor = '#191970'
    >

    <View style = {styles2.row}>
    <Text style = {{color:'#B67075'}}>Hello</Text>
    </View>

    </TouchableHighlight>
    </View>
  );
}}
/>
question awaiting-reply

Most helpful comment

yes, I have also same problem. TouchableHighlight and TouchableOpacity doesn't working inside the renderHeader and renderContent,

All 5 comments

yes, I have also same problem. TouchableHighlight and TouchableOpacity doesn't working inside the renderHeader and renderContent,

Same problem here, I need to call a function onPress and I always got the same error _this3._onPressButton is not a function.

Anyone know a workaround ?

Same Problem here, when trying to use on press method inside renderHeader, can anyone have implemented same.
_renderHeader(section, i, isActive) {
return (






);
}

Hey sorry for late reply. Can any of you make an example over here https://snack.expo.io. Just so I can see what code produces the error.

Closing as inactive. Please ping me to reopen or create a new issue if this still occurs in the latest version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SaberRiryi picture SaberRiryi  路  3Comments

brettdh picture brettdh  路  3Comments

Korysam15 picture Korysam15  路  4Comments

performatric picture performatric  路  5Comments

alexstoyanov picture alexstoyanov  路  6Comments