[Stepper] When programmatically switching to / from layout="horizontal-single"
, component breaks
#8931
Closed
2 of 6 tasks
Labels
4 - verified
Issues that have been released and confirmed resolved.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
Calcite (design)
Issues logged by Calcite designers.
calcite-components
Issues specific to the @esri/calcite-components package.
estimate - 2
Small fix or update, may require updates to tests.
impact - p1 - need for current milestone
User set priority impact status of p1 - need for current milestone
p - high
Issue should be addressed in the current milestone, impacts component or core functionality
Milestone
Check existing issues
Actual Behavior
When programmatically adjusting the
layout
property to / fromhorizontal-single
, the component does not correctly display the steps. It only displays a single step. In some cases, it displays all the step text on top of one another. Switching between onlyhorizontal
andvertical
works fine. The issue is worse after adjusting the width of the component - I think the resizeObserver in the component is causing it. And probably unneeded since this is just changed via prop value.Screen.Recording.2024-03-12.at.6.45.00.PM.mov
Expected Behavior
I'd expect the component to toggle between states without issue.
Reproduction Sample
https://codepen.io/mac_and_cheese/pen/jORrZvr
Reproduction Steps
horizontal-single
layout
mode.horizontal-single
with all step text stacked.horizontal
andvertical
Reproduction Version
2.6.0
Relevant Info
No response
Regression?
No response
Priority impact
p1 - need for current milestone
Impact
This happens when programmatically setting the property. The Codepen shows a button-click example, but a more realistic implementation is in the Codepen, a simplified "responsive adjustment" to the property value.
Quick look at the code suggests something in
determineActiveStepper()
or the width-determiningresizeObserver()
could be the issue. Since the property is not set based on width change of the Stepper component, do we need to monitor width? The bug is worse (only shows a single step) after adjusting the page width. The bug is still present before this, just not as bad.Calcite package
Esri team
Calcite (design)
The text was updated successfully, but these errors were encountered: