-
Notifications
You must be signed in to change notification settings - Fork 76
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
Emit calciteStepperItemChange
when navigating by stepper methods
#5021
Comments
We only emit change events on user interaction, so any code calling the stepper methods needs to sync up accordingly. Reason being that the code calling the stepper methods knows that there is potentially a change in step, hence why we don't emit. It also helps avoid cases where we can't distinguish where a change event came from. I think what's missing is a property to easily know the selected stepper item. FYI, I'll have a PR for cleaning up event payloads this week that will introduce this prop. |
Some items here as follow up from triage:
|
Installed and assigned for verification. |
Spike summary:
|
Added to this milestone per ☝️. |
Closing in favor of #2094 as title and description are closer to the changes #9351 will include. cc @geospatialem |
Description
When a user clicks a button that invokes a stepper method and navigates a stepper, the stepper should emit a
calciteStepperItemChange
events.Acceptance Criteria
A stepper emits a
calciteStepperItemChange
whenever the step changes either by clicking a stepper-item heading or via a stepper method.Relevant Info
No response
Which Component
calcite-stepper
Example Use Case
In some cases, it's necessary to force a user to visit steps in order. This can currently be accomplished by disabling subsequent steps and offering a button that, when clicked, enables the next step and navigates to it via the stepper's
nextStep()
method.In order to cleanly track the current step and which steps have been visited (regardless if the user clicked the button or navigated to a previously enabled step by clicking its heading), it'd be helpful to unify that code in a single
calciteStepperItemChange
handler.Another use case is the event provides an indicator that the step is rendered and ready for any setup work (e.g. setting initial focus).
The text was updated successfully, but these errors were encountered: