Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchBar - iOS icon error #3837

Closed
1 task done
Mazztwo opened this issue Sep 8, 2023 · 4 comments · Fixed by #3865
Closed
1 task done

SearchBar - iOS icon error #3837

Mazztwo opened this issue Sep 8, 2023 · 4 comments · Fixed by #3865

Comments

@Mazztwo
Copy link

Mazztwo commented Sep 8, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Platform

  • iOS
  • rneui 4 rc8
  • RN 72.4

Explain what you did

Using the SearchBar on latest 4 rc8 shows a '?' as the search bar symbol on iOS instead of the magnifying glass. Showing this Error in console:

Warning: Failed prop type: Invalid prop name of value ios-search supplied to Icon, expected one of ["accessibility",........]

We are not passing any such prop and this is working in the react-native-vector-icon v9.2.0

Expected behavior

We expect a magnifying glass as the search bar icon instead of the '?' with the warning.

Screenshots

This is what it looks like:
Screenshot 2023-09-11 at 3 32 06 PM

Even the https://reactnativeelements.com/docs/components/searchbar playground is showing a bad search icon:

Screenshot 2023-09-11 at 3 32 29 PM

@Mazztwo
Copy link
Author

Mazztwo commented Sep 11, 2023

Temporarily, I pass the SearchBar component the prop SearchIcon with the value being an Icon:

const searchIcon = () => {
        return (
            <Icon
                name={'magnify'}
                type={'material-community'}
            />
        );
    };

<SearchBar 
   ...
   searchIcon={searchIcon}
/>

@thomasamaddeo-genie
Copy link

thomasamaddeo-genie commented Oct 24, 2023

Any update on this?
having the same issue on iOS only.

Search and Clear icons not displaying

image

"@rneui/base": "^4.0.0-rc.8"
"@rneui/themed": "^4.0.0-rc.8"
"react-native": "0.72.6"

Also temporarily addressed it manually specifying both icons (which wasn't previously required).

@arcln
Copy link

arcln commented Nov 10, 2023

This happens to me when upgrading react-native-vector-icons from v9 to v10.

@soniaalabed
Copy link

I was able to fix this by adding the a searchIcon:
<SearchBar searchIcon={Platform.OS === 'ios' ? {name: 'search'} : null} clearIcon={Platform.OS === 'ios' ? {name: 'close-circle'} : null} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants