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

Prev/Next buttons for changing selection #45

Open
DWMiller opened this issue Jul 3, 2018 · 3 comments
Open

Prev/Next buttons for changing selection #45

DWMiller opened this issue Jul 3, 2018 · 3 comments

Comments

@DWMiller
Copy link

DWMiller commented Jul 3, 2018

Is this possible? Having the buttons change the view is all well and good, but even better if it could be set to move the the selection as well.

@Nickman87
Copy link
Collaborator

@DWMiller This is currently not supported, but it wouldn't be to hard to expose the button handlers to support this kind of functionality. If you want you can make a pull request for it?

@DWMiller
Copy link
Author

DWMiller commented Jul 4, 2018

Might take a look on the weekend, what would say makes more sense, a prop to set true/false on the buttons scrolling the active value, or a function that would be called on scroll and provided with the new position (which you would use to update the value yourself)?

@Nickman87
Copy link
Collaborator

I think adding a function to call when the button is pressed provides the greatest flexibility do interact with the button presses in any way you want.

  • Returning nothing or true would just scroll like it does now
  • Returning a number will try to select that index
  • Returning false would cancel any action

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

No branches or pull requests

2 participants