react-native-ui-kitten icon indicating copy to clipboard operation
react-native-ui-kitten copied to clipboard

Changing selectedIndex in ViewPager doesnt work

Open qbunia opened this issue 2 years ago • 5 comments

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>

qbunia avatar Mar 14 '22 09:03 qbunia

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

Ayush-Navadiya avatar Mar 14 '22 11:03 Ayush-Navadiya

No it still doesnt work.

qbunia avatar Mar 14 '22 13:03 qbunia

Show the hook, too.

SaidTorres3 avatar Aug 17 '22 21:08 SaidTorres3

@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 avatar Oct 31 '22 15:10 greenfrvr

@qbunia which version did you use?

greenfrvr avatar Oct 31 '22 15:10 greenfrvr