Skip to content

New component stepper stepperpanel - #6244

Merged
gucal merged 10 commits into
primefaces:masterfrom
gucal:new-component-stepper-stepperpanel
Mar 28, 2024
Merged

gucal merged 10 commits into
primefaces:masterfrom
gucal:new-component-stepper-stepperpanel

Conversation

@gucal

@gucal gucal commented Mar 28, 2024

Copy link
Copy Markdown
Contributor

New component - Stepper

@vercel

vercel Bot commented Mar 28, 2024 •

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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

@melloware melloware Mar 28, 2024 •

Copy link
Copy Markdown
Member

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

Comment thread components/lib/stepper/Stepper.js Outdated
Comment thread components/lib/stepper/Stepper.js Outdated
Comment thread components/lib/stepper/StepperBase.js
Comment thread components/lib/stepper/Stepper.js Outdated
Comment thread components/doc/stepper/pt/wireframe.js
@github-actions

Copy link
Copy Markdown

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