Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast scroll to top show empty cell when selectedIndex is not 0 #48

Open
menghany opened this issue Feb 15, 2023 · 3 comments
Open

Fast scroll to top show empty cell when selectedIndex is not 0 #48

menghany opened this issue Feb 15, 2023 · 3 comments

Comments

@menghany
Copy link

2023-02-15.11.57.37.mov
@menghany
Copy link
Author

const [selectedIndex,setSelectedIndex] = useState(15)
const onWheelChange = index => {
setSelectedIndex(index)
  }
<WheelPicker
      options={options}
      selectedIndicatorStyle={{backgroundColor: '#F6F7F9'}}
      itemHeight={36}
      visibleRest={3}
      selectedIndex={selectedIndex}
      onChange={onWheelChange}
      itemTextStyle={{
        fontSize: 16,
        color: '#333',
        fontWeight: 500
      }}
    />

@erksch
Copy link
Owner

erksch commented Feb 21, 2023

Thanks for reporting, Is this Android or iOS?

@menghany
Copy link
Author

Both Android and iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants