hossein-zare / react-native-dropdown-picker

A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.
https://hossein-zare.github.io/react-native-dropdown-picker-website/
MIT License
991 stars 296 forks source link

Can the selected item be hidden from the dropdown list? #613

Open nine-9-nine opened 1 year ago

nine-9-nine commented 1 year ago

Hi, first.. amazing package!

The only thing that bothers me, is that the selected item is shown again in the dropdown list. Is there any way to hide the selected item in the dropdown list, so it does not show up twice?

Thank you!

valdrin-hoti commented 1 year ago

Hi @nine-9-nine, i faced the same issue and solved it via styles:

selectedItemContainerStyle={{
        display: 'none',
      }}

Hope this works for you too.

nine-9-nine commented 1 year ago

Thank you so much @valdrin-hoti, works perfectly!

johnf commented 8 months ago

This sort of works, unless you have an item separator and then they double up