MobileReality / react-native-select-pro

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

[BUG] Doesn't scroll to selected option #236

Closed brilliantinsane closed 4 months ago

brilliantinsane commented 11 months ago

Describe the bug If one of the options is selected where you need to scroll to see it, after you reopen the select it is not "preselected" - it doesn't scroll to it like in the examples in the docs.

Expected behavior It should scroll to the selected option.

Screenshots Screenshot 2023-12-20 at 12 29 23

Video https://github.com/MobileReality/react-native-select-pro/assets/34303783/eed8988d-d840-4f1d-9231-e724a0141e48

Environment (please complete the following information):

Additional context Here is my code - the most basic example there is:

const TEST_DATA = [
  {
    label: 'test1',
    value: 'test1',
  },
  {
    label: 'test2',
    value: 'test2',
  },
  {
    label: 'test3',
    value: 'test3',
  },
  {
    label: 'test4',
    value: 'test4',
  },
  {
    label: 'test5',
    value: 'test5',
  },
  {
    label: 'test6',
    value: 'test6',
  },
  {
    label: 'test7',
    value: 'test7',
  },
  {
    label: 'test8',
    value: 'test8',
  },
  {
    label: 'test9',
    value: 'test9',
  },
  {
    label: 'test10',
    value: 'test10',
  },
  {
    label: 'test11',
    value: 'test11',
  },
  {
    label: 'test12',
    value: 'test12',
  },
];

<Select
   options={TEST_DATA}
/>

Also, I should mention that I have wrapped my app inside <SelectProvider />

Is there something I'm missing here? Something I'm doing wrong? The version of the package that I have installed is 2.2.3.

TheProgamererZ commented 6 months ago

@brilliantinsane Same Issue. No response from this team.

Btw please check out another issue that I raised in this section itself , if any help possible.

dawidgierdal commented 4 months ago

it's resolved https://github.com/MobileReality/react-native-select-pro/pull/239/files