-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Here's the code that I'm using. Pretty straightforward and I'm just trying to make it work.
const [updatedAge, setUpdatedAge] = useState(mortalityAge);
...
<DynamicallySelectedPicker
transparentItemRows={1}
items={Array.from({ length: maxAge - age }, (_, i) => {
const value = i + age + 1;
return {
key: value,
label: value.toString(),
value: value,
};
})}
onScroll={({ index }) => setUpdatedAge(index)}
onMomentumScrollBegin={({ index }) => setUpdatedAge(index)}
onMomentumScrollEnd={({ index }) => setUpdatedAge(index)}
onScrollBeginDrag={({ index }) => setUpdatedAge(index)}
onScrollEndDrag={({ index }) => setUpdatedAge(index)}
initialSelectedIndex={updatedAge - age - 1}
/>
...
Below is some reference videos
Screen.Recording.2024-10-16.at.4.20.35.PM.mov
Screen.Recording.2024-10-16.at.4.20.56.PM.mov
Metadata
Metadata
Assignees
Labels
No labels