Index to initially center.
Data to display.
Optional
getFunction to retrieve the text to display for an element as a label.
Optional
containerFunction called when the layout of the container changes.
Example usage for monitoring the container's height:
const [pickerHeight, setPickerHeight] = useState<number>(0);
const onLayout = useCallback((event: LayoutChangeEvent) => {
const { height } = event.nativeEvent.layout;
setPickerHeight(height);
}, []);
return (
<View style={{flexDirection: "row"}}>
<View style={{height: height}}>
<Text>Picker label</Text>
</View>
<RepeatingWheelPicker
//...
containerOnLayout={onLayout}
/>
</View>
);
layout change event that triggered onLayout
Optional
enabledEnables / disables scrolling of the wheel picker.
Optional
itemHeight per displayed item.
Optional
itemNumber of items to display.
Optional
containerVertical padding for the container of the wheel picker.
Optional
containerHorizontal padding for the container of the wheel picker.
Optional
containerStyling for the container of the wheel picker.
Optional
itemStyling for the container of each element.
Optional
itemStyling for the text of the elements.
Optional
enableIf enabled, will show a gradient fade towards the top and bottom of the wheel picker.
Optional
gradientColor the gradient should fade to at the top and bottom.
Function to set currently selected element and use it in your application.