Skip to content
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

Linear stepper stuck on the step after re-initialization #15449

Open
ilinyhsergey opened this issue Mar 12, 2019 · 9 comments
Open

Linear stepper stuck on the step after re-initialization #15449

ilinyhsergey opened this issue Mar 12, 2019 · 9 comments
Labels
area: cdk/stepper help wanted The team would appreciate a PR from the community to address this issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@ilinyhsergey
Copy link

What is the expected behavior?

After linear stepper reinitialization (f.e. web-app reload) all previously filled out forms of steps restore their valid state from storage and stepper restore selectedIndex. All these forms should be considered as visited and completed so user can navigate back without restriction.

What is the current behavior?

User completed step 1 and 2 and stay on step 3.
States of forms on step 1 and 2 are saved in storage.
After reload, forms on step 1 and 2 restore its states, so the steps are valid and selectedIndex set to step 3.
User can't navigate back to step 2, despite the fact that this step is valid. User can only navigate to step 1.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-a5jw17

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

    "@angular/cdk": "^7.3.1",
    "@angular/core": "7.2.4",
    "@angular/material": "^7.3.1",
    "typescript": "3.2.4",

Windows 8.1; Google Chrome 72.0.3626.121;

Is there anything else we should know?

@unit147
Copy link

unit147 commented Mar 12, 2019

Can confirm, same issue

@turu-shep
Copy link

turu-shep commented Mar 12, 2019

Happens the same.
Chrome 72.0.3626.121
MacOS Mojave 10.14.3

Blocks even if:

  • values in steps 1 & 2 are hardcoded, so form group is valid from the beginning
  • After reload on step 3, enter data in step 3 form group (so step 3 becomes valid, step 1 & 2 valid but not activated after reload) and trying to go to step 4 and it fails.
  • if [editable] and [completed] are hardcoded to be true in MatStep

@megalo3
Copy link

megalo3 commented Apr 1, 2019

Having the same issue

@akvaliya
Copy link

akvaliya commented Apr 2, 2019

Same issue here

@josephperrott josephperrott added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent help wanted The team would appreciate a PR from the community to address this issue labels Jun 4, 2019
@turu-shep
Copy link

turu-shep commented Jul 8, 2019

Any news here? Issue still exists and blocking almost any possible flow with url navigations, component UX looks inconsistent because of this

@gabor182
Copy link

I have the same issue with the latest version too.

@rabindranathforcast
Copy link

i have same issue here, i expend around 3 hours try to fix it but didn't work....

@lianbwl
Copy link

lianbwl commented Oct 24, 2019

same issue here, is getting depressing to use Angular Material T_T

@maximilianbayerl
Copy link

maximilianbayerl commented Nov 6, 2019

ngAfterViewInit(){ this.stepper._steps.toArray()[0].interacted = true; }
setting previous steps as interacted did work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cdk/stepper help wanted The team would appreciate a PR from the community to address this issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests