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

Search error styles and text #404

Closed
TheElegantCoding opened this issue Sep 14, 2021 · 5 comments
Closed

Search error styles and text #404

TheElegantCoding opened this issue Sep 14, 2021 · 5 comments

Comments

@TheElegantCoding
Copy link

TheElegantCoding commented Sep 14, 2021

in the new version of the dropdown picker it seems impossible to modify the error message and the styles of the same, I am talking about the error message in the search

WhatsApp Image 2021-09-14 at 4 53 01 PM

Look at the error message that says "there is nothing to show", I want to change the message and the color of the text

in the older version of the dropdown picker, it was possible to pass the prop for change the message and the styles

searchableError={() => <Text>Not Found</Text>}

i look at the props types of the component and i don't see anything that can change the style that and in the documentation, there is no information about the error search

@hossein-zare
Copy link
Owner

There are two props you can take advantage of

listMessageContainerStyle
listMessageTextStyle

@hossein-zare
Copy link
Owner

hossein-zare commented Sep 15, 2021

Localization
https://hossein-zare.github.io/react-native-dropdown-picker-website/docs/advanced/localization#change-the-translation

translation={{
  NOTHING_TO_SHOW: "There's nothing to show!"
}}

@TheElegantCoding
Copy link
Author

whit these props I change the color perfectly

listMessageTextStyle
listMessageContainerStyle

i can change the translation whit

translation={{
  NOTHING_TO_SHOW: "There's nothing to show!"
}}

but i am using typescript and that give me this error

Type '{ NOTHING_TO_SHOW: string; }' is missing the following properties from type 'TranslationInterface': PLACEHOLDER, SEARCH_PLACEHOLDER, SELECTED_ITEMS_COUNT_TEXT

so i need to put all variables like the documentation

translation={{
  PLACEHOLDER: "Sélectionnez un élément",
  SEARCH_PLACEHOLDER: "Tapez quelque chose...",
  SELECTED_ITEMS_COUNT_TEXT: "{count} éléments ont été sélectionnés",
  NOTHING_TO_SHOW: "Il n'y a rien à montrer!"
}}

everything works fine whit all variables

@hossein-zare
Copy link
Owner

Please install react-native-dropdown-picker@5.1.27

@TheElegantCoding
Copy link
Author

in react-native-dropdown-picker@5.1.27 all work fine 👍, and I only need one parameter in:

translation={{
  NOTHING_TO_SHOW: "No hay coincidencias"
}}

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

No branches or pull requests

2 participants