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

[Select] Select scroll speed addition #3090

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Saikedo
Copy link

@Saikedo Saikedo commented Aug 28, 2024

Added the following props to SelectScrollUpButtonProps and SelectScrollDownButtonProps to be able to control the scroll speed when hovering or clicking on those buttons.

Props added

  hoverScrollFactor?: number;
  touchScrollFactor?: number;

I made the decision to supply two separate props because the functionality and the use case might be very different. On web when hovering over the buttons, in some scenarios scroll is too fast so we might put a value of hoverScrollFactor={0.3} for example to slow it down. At the same time on mobile we might want to increase how much the list scrolls on press so we will set touchScrollFactor={2} for example.

Tested on web with various browsers as well as on Android and iOS real devices.

…ers accidentally being passed to a div via spread operator
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

Successfully merging this pull request may close these issues.

1 participant