When I use TouchableOpacity
my code works fine, but when I use TouchableWithoutFeedback
my code throws an error. As I don't want that blurred effect on click, I want to use TouchableWithoutFeedback
instead.
return (
<View style={{ ...props.style}}>
<TouchableWithoutFeedback style={{...styles.row }} onPress={toggleExpand}>
<Text style={{ fontFamily : 'wiproakkurat-bold' , fontSize : RFValue(14) , color : '#434343' , paddingLeft : RFValue(18), ...props.styleText ,}}>{props.title}</Text>
<Icon style={{paddingRight : RFValue(18)}} name={toggle.expanded ? 'keyboard-arrow-up' : 'keyboard-arrow-down'} size={RFValue(30)} color={'pink'} />
</TouchableWithoutFeedback>
<View style={styles.parentHr}/>
{
toggle.expanded &&
<View style={styles.child}>
{props.data}
</View>
}
</View>
)