The functions onFocus
, onBlur
of TouchableWithoutFeedback
component aren't triggering. I wanted to make this work like the TextInput
component, in terms of getting focused and unfocused, when the user clicks on this component and then on other components' on the UI.
Link: https://reactnative.dev/docs/touchablewithoutfeedback#onblur
<TouchableWithoutFeedback onFocus={() => { console.log('onFocus'); setIsFocused(true); }} onBlur={() => { console.log('onBlur'); setIsFocused(false); }}><View style={styles.outerContainerStyle}><Text style={styles.headerTextStyle}>{header}</Text><Text style={styles.descriptionTextStyle}>{description}</Text><Text style={styles.footerTextStyle}>{footer}</Text></View></TouchableWithoutFeedback>