callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.58k stars 2.05k forks source link

Where is the onClearIconPress on Searchbar component? #4208

Open d8vjork opened 7 months ago

d8vjork commented 7 months ago

Ask your Question

image image

Seems like this prop type is missing from Searchbar but the documentation says otherwise:

https://callstack.github.io/react-native-paper/docs/components/Searchbar

Btw I'm using React Native Paper v5 (docs are in the same version)

d8vjork commented 7 months ago

Also when added this breaks the onIconPress and onEndEditing

lukewalczak commented 7 months ago

Hej @d8vjork, which library version exactly you are using?

Also when added this breaks the onIconPress and onEndEditing

Could you please elaborate on it?

d8vjork commented 7 months ago

@lukewalczak As described:

Btw I'm using React Native Paper v5 (docs are in the same version)

I was trying to modify the behaviour of this clear icon so it clear the search list but managed to sort of workaround this with the following:

image

My thought was: Why this is in the v5 docs but nothing related in the v5 codebase?

lukewalczak commented 7 months ago

Are you able to create sample repo with your bug reproduction? The onClearIconPress is used in our example and there is no issue with it, so wondering what can be wrong 🤔

d8vjork commented 4 months ago

@lukewalczak Sorry! Didn't manage to have time for this so I just shortcut the issue in some way

Now the issue I've is within same component but with its style, as 5.x documentation says there is a mode prop on the Searchbar component...

The problem is that my Expo based application at production builds shows different than dev builds (see screenshot below).

telegram-cloud-photo-size-4-5999064075872617270-y

d8vjork commented 4 months ago

I wrote down on this Gist what I've so far that could be relevant (theme is customised as documentation says) and using MD3 so should be fine as it is on production builds but locally seems to use a completely different styling?