Skip to content

Unable to scroll on iOS simulator app #47

@andrehadianto

Description

@andrehadianto

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions