MobileReality / react-native-select-pro

React Native dropdown (select) component developed by Mobile Reality
https://mobilereality.github.io/react-native-select-pro
MIT License
280 stars 18 forks source link

[BUG] weird behavior when we have two options data set #230

Closed danish5454 closed 9 months ago

danish5454 commented 1 year ago

Describe the bug When I have two options in list and I select first one and after that select second one the first option got disappear. also I got weird warning initialScrollIndex "-1" is not valid (list has 3 items)

To Reproduce Steps to reproduce the behavior:

  1. add test two option to dropdown
  2. select first one
  3. now select second one without crossing first one.
  4. now open the dropdown you will see

Expected behavior It should show list and don't lose the lis

Screenshots Screenshot 2023-09-12 at 1 59 35 PM

Environment (please complete the following information):

Additional context

https://github.com/MobileReality/react-native-select-pro/assets/132438054/b135ebe1-5f00-406b-8b01-8a71ce560917

sajaprzemyslaw commented 1 year ago

@danish5454 While I'm still investigating this behaviour for a quick workaround, try adding the scrollToSelectedOption={false} prop, this should solve the problem

efstathiosntonas commented 10 months ago

Hi, this is fixed on 2.2.3

@gitsad totally missed this issue when I opened the PR earlier today 🤦‍♂️

gitsad commented 9 months ago

Thanks @efstathiosntonas !