Skip to content

Chip onPress doesn't work on android device #4399

@JamieColclough

Description

@JamieColclough

Current behaviour

Since a recent react native update, when pressing on a <Chip> component, the onPress event is not fired, although the onPressIn and onPressOut events still work

Expected behaviour

The onPress event should fire when pressing a <Chip> component

How to reproduce?

Create a <Chip> component as follows:

<Chip
    icon={'information'}
     onPress={() => {
         console.log('onPressed')
     }}
     onPressIn={() => {
         console.log('press in')
     }}
     onPressOut={() => {
         console.log('press out')
     }}
>
     Hello
</Chip>

And observe what logs are called when clicking on it

What have you tried so far?

Stripping out any functionality that may affect the onPress so it's just console.logs in the method now

Your Environment

software version
android min sdk version 24 (error occurs in multiple devices)
react-native 0.73.6
react-native-paper 5.12.3
node 18.20.2
npm or yarn 3.6.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions