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

New component stepper stepperpanel #6244

Merged
merged 10 commits into from
Mar 28, 2024

Conversation

gucal
Copy link
Contributor

@gucal gucal commented Mar 28, 2024

New component - Stepper

Copy link

vercel bot commented Mar 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
primereact ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2024 3:23pm
primereact-v9 ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2024 3:23pm

Copy link

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 });
Copy link
Member

@melloware melloware Mar 28, 2024

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);

Copy link
Contributor Author

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.

components/lib/stepper/Stepper.js Outdated Show resolved Hide resolved
components/lib/stepper/Stepper.js Outdated Show resolved Hide resolved
components/lib/stepper/StepperBase.js Show resolved Hide resolved
components/lib/stepper/Stepper.js Outdated Show resolved Hide resolved
components/doc/stepper/pt/wireframe.js Show resolved Hide resolved
Copy link

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>.

@gucal gucal merged commit e280827 into primefaces:master Mar 28, 2024
4 of 5 checks passed
@gucal gucal linked an issue Mar 29, 2024 that may be closed by this pull request
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.

New Component - Stepper
3 participants