akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.3k stars 952 forks source link

Changing selectedIndex in ViewPager doesnt work #1594

Open qbunia opened 2 years ago

qbunia commented 2 years ago

Changing timelineIndex in setSelectedIndex doenst change page in ViewPager at all.

<ViewPager
 selectedIndex={timelineIndex}
onSelect={index => setSelectedIndex(index)}
>
<View key={0}><Text>0</Text></View>
<View key={1}><Text>1</Text></View>
</ViewPager>
Ayush-Navadiya commented 2 years ago

Have you tried with layout ? Is it working with layout?

qbunia commented 2 years ago

No it still doesnt work.

SaidTorres3 commented 2 years ago

Show the hook, too.

greenfrvr commented 1 year ago

@qbunia can you please provide some code snippet, which allows to reproduce the issue? I've check on a sample project changing selectedIndex makes ViewPager to change the page, can't reproduce the issue for now

greenfrvr commented 1 year ago

@qbunia which version did you use?