-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
19.2.19
Description
When the linear input of MatStepper is changed dynamically at runtime, the internal logic updates, but the UI (step headers / enabled state) does not reflect the change.
This results in inconsistent behavior where navigation rules follow the new linear value, but the visual state (e.g. disabled/enabled steps) remains stale.
We are experiencing this issue in a production enterprise application after migrating Angular Material from v19 to v21. The inconsistent UI state is causing confusion among users, as the stepper appears visually disabled while it is actually enabled and allows navigation.
Reproduction
Using example from official docs:
StackBlitz link: https://stackblitz.com/run?file=src%2Fexample%2Fstepper-overview-example.ts&startScript=start
Steps to reproduce:
- Note that initially when hovering 2nd or 3rd step, it is active
- Click 'Enable linear mode' button
- Note that when hovering 2nd or 3rd step it remains active, but you cannot navigate there. The same issue occurs in the opposite scenario, when the stepper is initially configured as linear and then linear mode is disabled. In that case, the problem is even more confusing: the steps still appear visually disabled, but they respond to clicks and navigation works.
Expected Behavior
Changing [linear] dynamically should update visual state of step headers.
Actual Behavior
Changing [linear] dynamically does not update visual state of step headers.
Environment
- Angular:21.2.3
- CDK/Material:21.2.3
- Browser(s):Chrome
- Operating System (e.g. Windows, macOS, Ubuntu):macOS
