onpress does not take effect
Qy742698 opened this issue · 1 comments
Qy742698 commented
I'm using the onpress method, which, judging by the mention property, won't display the Alert.alert ('Mention pressed!') ;
<Autolink
text={text}
onPress={(url, match) => {
switch (match.getType()) {
case 'mention':
Alert.alert('Mention pressed!');
default:
Alert.alert('Link pressed!');
}
}}
/>
joshswan commented
You are missing both a break
in your switch
AND props to control mentions and other types of links (i.e. the mention
, url
, etc. props).
Please stop opening issues without clear reproductions that have to do with this library and not your code. This is not a support forum.