Skip to content

<List.Item /> onPress not working #875

@ManalLiaquat

Description

@ManalLiaquat

Current behaviour

<List.Item onPress={()=>{console.log('something here')}} /> does not working

Expected behaviour

I just want to press list item and want to navigate to other screen.

Code sample

render() { const { myFriends } = this.state; return ( <View> {myFriends.map((v, i) => { return ( <List.Item key={i} title={${v.name} (${v.displayName})} description={v.phoneNumber} left={props => ( <Avatar.Image {...props} size={50} source={{ uri: v.photoURL }} onPress={() => { console.log("**********i"); }} /> )} /> ); })} </View> ); }

Screenshots (if applicable)

screenshot_1

What have you tried

Please suggest me anything.

Your Environment

software version
ios or android Marshmallow
react-native https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz
react-native-paper 2.11.1
node 11.3.0
npm or yarn 6.4.1
expo sdk 32.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions