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

Implement OnCompleted prop for Slider #46

Merged
merged 4 commits into from
Jun 24, 2024
Merged

Conversation

sircfenner
Copy link
Owner

This PR adds an OnCompleted callback prop to Slider which is called with the most recent slider value when sliding is finished. It is also called when, during sliding, the component becomes Disabled via props or is unmounted. NumericInput has also been updated to pass its OnSubmitted callback prop through to the companion Slider's OnCompleted prop when specified.

Closes #45

Copy link

@jeparlefrancais jeparlefrancais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@@ -20,6 +20,7 @@

Use the `Arrows` and `Slider` props to specify whether up/down arrows and a slider should be
included. If arrows or a slider are displayed, they will increment the value by the amount of the step.
Completing a slide with a slider will call the `OnSubmitted` prop (if provided) with the latest value.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

@sircfenner sircfenner merged commit 722051b into main Jun 24, 2024
1 check passed
@sircfenner sircfenner deleted the slider-oncompleted branch June 24, 2024 16:36
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.

Add OnCompleted prop to Slider for when sliding is done
2 participants