Open andrehadianto opened 1 month ago
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
https://github.com/user-attachments/assets/83df9ee5-1fd4-4e2c-a1b5-1b738f3378ae
https://github.com/user-attachments/assets/c1a99b41-9f47-4028-bc67-9848f2d99bcc
@andrehadianto no errors? maybe you have a transparent container over the scroller?
Here's the code that I'm using. Pretty straightforward and I'm just trying to make it work.
Below is some reference videos
https://github.com/user-attachments/assets/83df9ee5-1fd4-4e2c-a1b5-1b738f3378ae
https://github.com/user-attachments/assets/c1a99b41-9f47-4028-bc67-9848f2d99bcc