Skip to content

SearchBar has phantom clickable invisible trailing area (right side), without anyway to disable #4757

@klzheng

Description

@klzheng

Current behaviour

The SearchBar component has a clickable invisible area on the right side of the input

Image

Expected behaviour

The SearchBar should not have any clickable areas that are invisible on the right side of the input. Ideally, it should look something like this when the search bar is empty

Image

How to reproduce?

It looks like the issue is isolated to the component itself. This is what the component might look like:

<Searchbar
    placeholder="Search for items"
    onChangeText={(prev) => setSearch(prev)}
    value={search}
    clearIcon={undefined}
    onIconPress={undefined}
    onTraileringIconPress={undefined}
    traileringIcon={undefined}
    onClearIconPress={undefined}
    onPress={undefined}
  />

What have you tried so far?

As seen in above, I have tried to set all the known relevant properties to undefined, thinking that maybe it was a configuration issue. But the issue still seems to persist despite setting all these properties to undefined.

Your Environment

software version
react-native 0.74.5
react-native-paper 5.12.5
expo sdk 51.0.39

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