-
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/edit/q9oe6yxj?file=src%2Fexample%2Fstepper-overview-example.ts
Steps to reproduce:
- Note that initially when hovering 2nd or 3rd step, it is not active
- Click 'Disable linear mode' button
- Note that when hovering 2nd or 3rd step it remains not active, but you can navigate there. The similar issue occurs in the opposite scenario.
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
