-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
New component stepper stepperpanel #6244
New component stepper stepperpanel #6244
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
const updateActiveStep = (event, index) => { | ||
setActiveStepState(index); | ||
|
||
props.onChangeStep && props.onChangeStep({ originalEvent: event, index }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only thought here is what I have done in other components is give the user a change to say they don't want to change the step because some validation they have or some check. So someting like this...
const updateActiveStep = (event, index) => {
props.onChangeStep && props.onChangeStep({ originalEvent: event, index });
// allow user to mark event.preventDefault() to stop this step from advancing
if (event.defaultPrevented()) {
return;
}
// set the new step
setActiveStepState(index);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a note to add this later. Thanks for the feedback.
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
New component - Stepper