We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This isn't really an issue with the code itself, just the first example that was used. My apologies if this has already been covered. In the example:
function renderOption(option, selected, onSelect, index){ const style = selected ? { fontWeight: 'bold'} : {}; return ( <TouchableWithoutFeedback onPress={onSelect} key={index}> <Text style={style}>{option}</Text> </TouchableWithoutFeedback> ); }
will throw the warning: TouchableWithoutFeedback does not work well with Text Children. Changing it to:
renderOption(option, selected, onSelect, index) { const style = selected ? { fontWeight: 'bold' } : {}; return ( <TouchableWithoutFeedback onPress={onSelect} key={index}> <View> <Text style={style}>{option}</Text> </View> </TouchableWithoutFeedback> ); }
fixes it.
Also, the optionContainerStyle prop doesn't appear to pass effectively. But if I pass the styles traditionally using the above added , it will work:
renderOption(option, selected, onSelect, index) { const style = selected ? { fontWeight: 'bold' } : {}; return ( <TouchableWithoutFeedback onPress={onSelect} key={index}> <View style={styles.optionContainer}> <Text style={style}>{option}</Text> </View> </TouchableWithoutFeedback> ); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This isn't really an issue with the code itself, just the first example that was used. My apologies if this has already been covered. In the example:
will throw the warning: TouchableWithoutFeedback does not work well with Text Children. Changing it to:
fixes it.
Also, the optionContainerStyle prop doesn't appear to pass effectively. But if I pass the styles traditionally using the above added , it will work:
The text was updated successfully, but these errors were encountered: