When scrolling too fast with a VirtualizedWheelPicker, the picker data disappears from view (I think it moves off screen).
import { Text, SafeAreaView, View, StyleSheet } from 'react-native';
import { useState } from 'react';
import WheelPicker, {
withVirtualized,
} from '@quidone/react-native-wheel-picker';
const weightIntegersData = Array.from({ length: 499 }, (_, i) => ({
value: i + 40,
}));
const VirtualizedWheelPicker = withVirtualized(WheelPicker);
export default function App() {
const [weightInteger, setWeightInteger] = useState(150);
return (
<SafeAreaView style={styles.container}>
<View style={{ flex: 1, justifyContent: 'center' }}>
<VirtualizedWheelPicker
data={weightIntegersData}
value={weightInteger}
onValueChanged={({ item: { value } }) => setWeightInteger(value)}
enableScrollByTapOnItem
/>
</View>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
backgroundColor: '#ecf0f1',
padding: 8,
},
});
When scrolling too fast with a VirtualizedWheelPicker, the picker data disappears from view (I think it moves off screen).
Minimal Reproducible Example you can try in an expo snack
ScreenRecording.picker.bug.disappearing.mov