Skip to content

bug(Stepper): Dynamic change of [linear] input does not update UI state #32964

@tomek1kk

Description

@tomek1kk

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:

  1. Note that initially when hovering 2nd or 3rd step, it is active
  2. Click 'Enable linear mode' button
  3. 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.

Image

Environment

  • Angular:21.2.3
  • CDK/Material:21.2.3
  • Browser(s):Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu):macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions