-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[Mat-Stepper] A few suggestions #7700
Comments
Would like to add one more suggestion here as well:
I was able to add steps with something like this: <mat-step *ngFor="let invForm of inventoryForms"
[stepControl]="invForm.form" [label]="invForm.item.product.name">
</mat-step> but if I go back to previous step, and change it so that these additional steps aren't required, and setting |
I got a work-around, but is probably a bad idea 😅
<mat-vertical-stepper #stepper></mat-vertical-stepper>
import { ViewChild } from '@angular/core';
import { MatVerticalStepper } from '@angular/material';
@ViewChild('stepper') stepper: MatVerticalStepper;
clearAdditionalForms(): void {
this.inventoryForms = [];
this.stepper._stateChanged(); // <- this : Marks the component to be change detected.
} |
I would like to also leave a suggestion. |
disabled attribute is must have. |
Perhaps related to 4. Animate Height: having it animate the same way tab transitions where you see the current content slide out |
Have any one a solution for suggestion 1? I tried quickly the same as in #8014 but ran into same issues. |
As @jdeanwaite suggested async step support is critical.
|
Allows for the user to reset a stepper to its initial state by calling the `reset` method. Relates to angular#7700.
Allows for the user to reset a stepper to its initial state by calling the `reset` method. Relates to angular#7700.
Allows for the user to reset a stepper to its initial state by calling the `reset` method. Relates to angular#7700.
* Turns the `MatStepper` into a proper component that allows consumers to switch between `horizontal` and `vertical` dynamically, allowing for use cases like having a different layout depending on the screen size. * Combines the `mat-vertical-stepper` and `mat-horizontal-stepper` templates into a single file to avoid all the code duplication. Relates to angular#7700.
* Turns the `MatStepper` into a proper component that allows consumers to switch between `horizontal` and `vertical` dynamically, allowing for use cases like having a different layout depending on the screen size. * Combines the `mat-vertical-stepper` and `mat-horizontal-stepper` templates into a single file to avoid all the code duplication. Relates to angular#7700.
Allows for the user to reset a stepper to its initial state by calling the `reset` method. Relates to angular#7700.
Allows for the user to reset a stepper to its initial state by calling the `reset` method. Relates to #7700.
I'd like to add: it would be nice if we could implement the |
That is how to add steps dynamically - |
Anything new about disabling single steps? EDIT The way to disable steps is to add on the `' a editable attribute.
It worked for me because I need to handle disabled after the step was I don't know if this can prevent entering next steps... |
Another great limitation of the steppers is that you cannot grow it to fill the entire parent space. I have a horizontal stepper and I want that the steps content cover all the available space (vertically). AFAIK there is no way to obtain this basic functionality. Any suggestion? |
@AGPX are you using @angular/flex-layout? |
@tonysamperi for sure, the problem is that the step contents are put inside a div with the class 'mat-horizontal-stepper-content'. Unfortunately, if you add the style 'height: 100%' this will grow all the steps including the hidden (not actived step), because they are hidden through the style 'visibility:hidden' instead of 'display:none' and so the previous hidden steps shift down the actived one. In addition, I found no example of what I wish to achieve. |
@AGPX can you do a stackblitz? |
@tonysamperi sorry, but the proxy of my company don't allow me to use stackblitz (I will make this example from my home, later). I try, however, to explain my problem now. Looking at the generated DOM of the stepper you have:
The only way to expand my content vertically in order to cover the entire vertical space is to add the style 'height: 100%' to 'mat-horizontal-stepper-content' and 'mat-horizontal-content-container' classes. Unfortunately, the 'mat-horizontal-stepper-content' is shared amongs all the steps and this will grow also the step 1 div (that is hidden). The result is that the step 2 content is shifted down. |
@tonysamperi eh... the div should cover the entire vertical space... |
@AGPX sorry, it did when I posted...maybe I didn't save... |
@AGPX ok it should work now... |
@tonysamperi thank you very much, it works! A bit tricky though, I think that this should be supported natively by the stepper component. Anyway, thanks again! |
@tonysamperi @AGPX I had the same problem and found a pretty simple solution. The Idea is, that the
I used So basically you only need to do the following:
|
@Springrbua good to know. Thanks! |
@Springrbua Thanks for the hint. However, IMHO, the stepper should support this capability natively. Generally speaking (coming from other frameworks), Angular Material should be by far more customizable. |
@AGPX I agree, that the stepper should allow you to easily customize the height of th stepper-content.
|
@Springrbua probably my problem is actually material design, or better the decision to adopt it. My boss tell me "...remove the underline on the input text...", "...put label on the left...", "...change this and that..." and I found very very difficult to apply any cosmetic changes to Material. Probably Angular Material is not the framework tailored for our needs, but it's not my choice (probably it was chosen without a sufficient understanding of its philosophy)... so I have to found workarounds. Forgive me, I'm only a coder. Thanks anyway for the precious support! |
@AGPX Take a look at the cdk, maybe it is what you are looking for. Basically all material components are build on top of it and add material design style to it. If you don't need material design style it might be what you are looking for. |
@AGPX you should have a more "component-wise" approach.
|
Any plan to implement Thanks a lot. |
How can we set success after completion of all state? |
I want the same. But want stepper fix at the bottom of the page & section should scroll. Any idea how to achieve that. |
@akvaliya if I remember correctly the stepper and the content are |
I'm trying to get the same style requested by @AGPX (horizontal stepper with the steps content cover all the available vertical space), but I'm struggling to get it. Even the workarounds suggested by @tonysamperi and @Springrbua aren't working for me, maybe they worked well when posted, but they don't for sure on version 10.1.3, that I'm using. Any suggestion? |
@kungufli I suggest not using github as stackoverflow. |
Combines `mat-vertical-stepper` and `mat-horizontal-stepper` into a single `mat-stepper` class in order to allow for the orientation to be changed dynamically. Also deprecates `MatVerticalStepper` and `MatHorizontalStepper`. This is a reimplementation of angular#9173, however this time I took a different approach which should make it easier to maintain and eventually remove the two separate steppers. It should result in a smaller bundle as well. The main differences are: 1. Rather than have 3 components (`MatStepper`, `MatVerticalStepper` and `MatHorizontalStepper`), these changes combine everything into `MatStepper` while `MatVerticalStepper` and `MatHorizontalStepper` are only used as injection tokens for backwards compatibility. The `selector` and `exportAs` of `MatStepper` is changed to match the two individual steppers and the orientation is inferred from the tag name. This will make it much easier to remove the deprecated directives. Furthermore, it should result in a smaller bundle since the template and styles only need to be inlined in one place. 2. `MatVerticalStepper` and `MatHorizontalStepper` are turned into very basic directives that have the same public API as `MatStepper` and they proxy everything to it. This is primarily so that if somebody managed to get a hold of a `MatVerticalStepper` or `MatHorizontalStepper` instance, or they used the old classes to type their own code, it wouldn't result in a breaking change. Relates to angular#7700.
Combines `mat-vertical-stepper` and `mat-horizontal-stepper` into a single `mat-stepper` class in order to allow for the orientation to be changed dynamically. Also deprecates `MatVerticalStepper` and `MatHorizontalStepper`. This is a reimplementation of angular#9173, however this time I took a different approach which should make it easier to maintain and eventually remove the two separate steppers. It should result in a smaller bundle as well. The main differences are: 1. Rather than have 3 components (`MatStepper`, `MatVerticalStepper` and `MatHorizontalStepper`), these changes combine everything into `MatStepper` while `MatVerticalStepper` and `MatHorizontalStepper` are only used as injection tokens for backwards compatibility. The `selector` and `exportAs` of `MatStepper` is changed to match the two individual steppers and the orientation is inferred from the tag name. This will make it much easier to remove the deprecated directives. Furthermore, it should result in a smaller bundle since the template and styles only need to be inlined in one place. 2. `MatVerticalStepper` and `MatHorizontalStepper` are turned into very basic directives that have the same public API as `MatStepper` and they proxy everything to it. This is primarily so that if somebody managed to get a hold of a `MatVerticalStepper` or `MatHorizontalStepper` instance, or they used the old classes to type their own code, it wouldn't result in a breaking change. Relates to angular#7700.
Combines `mat-vertical-stepper` and `mat-horizontal-stepper` into a single `mat-stepper` class in order to allow for the orientation to be changed dynamically. Also deprecates `MatVerticalStepper` and `MatHorizontalStepper`. This is a reimplementation of angular#9173, however this time I took a different approach which should make it easier to maintain and eventually remove the two separate steppers. It should result in a smaller bundle as well. The main differences are: 1. Rather than have 3 components (`MatStepper`, `MatVerticalStepper` and `MatHorizontalStepper`), these changes combine everything into `MatStepper` while `MatVerticalStepper` and `MatHorizontalStepper` are only used as injection tokens for backwards compatibility. The `selector` and `exportAs` of `MatStepper` is changed to match the two individual steppers and the orientation is inferred from the tag name. This will make it much easier to remove the deprecated directives. Furthermore, it should result in a smaller bundle since the template and styles only need to be inlined in one place. 2. `MatVerticalStepper` and `MatHorizontalStepper` are turned into very basic directives that have the same public API as `MatStepper` and they proxy everything to it. This is primarily so that if somebody managed to get a hold of a `MatVerticalStepper` or `MatHorizontalStepper` instance, or they used the old classes to type their own code, it wouldn't result in a breaking change. Relates to angular#7700.
Combines `mat-vertical-stepper` and `mat-horizontal-stepper` into a single `mat-stepper` class in order to allow for the orientation to be changed dynamically. Also deprecates `MatVerticalStepper` and `MatHorizontalStepper`. This is a reimplementation of angular#9173, however this time I took a different approach which should make it easier to maintain and eventually remove the two separate steppers. It should result in a smaller bundle as well. The main differences are: 1. Rather than have 3 components (`MatStepper`, `MatVerticalStepper` and `MatHorizontalStepper`), these changes combine everything into `MatStepper` while `MatVerticalStepper` and `MatHorizontalStepper` are only used as injection tokens for backwards compatibility. The `selector` and `exportAs` of `MatStepper` is changed to match the two individual steppers and the orientation is inferred from the tag name. This will make it much easier to remove the deprecated directives. Furthermore, it should result in a smaller bundle since the template and styles only need to be inlined in one place. 2. `MatVerticalStepper` and `MatHorizontalStepper` are turned into very basic directives that have the same public API as `MatStepper` and they proxy everything to it. This is primarily so that if somebody managed to get a hold of a `MatVerticalStepper` or `MatHorizontalStepper` instance, or they used the old classes to type their own code, it wouldn't result in a breaking change. Relates to angular#7700.
Combines `mat-vertical-stepper` and `mat-horizontal-stepper` into a single `mat-stepper` class in order to allow for the orientation to be changed dynamically. Also deprecates `MatVerticalStepper` and `MatHorizontalStepper`. This is a reimplementation of angular#9173, however this time I took a different approach which should make it easier to maintain and eventually remove the two separate steppers. It should result in a smaller bundle as well. The main differences are: 1. Rather than have 3 components (`MatStepper`, `MatVerticalStepper` and `MatHorizontalStepper`), these changes combine everything into `MatStepper` while `MatVerticalStepper` and `MatHorizontalStepper` are only used as injection tokens for backwards compatibility. The `selector` and `exportAs` of `MatStepper` is changed to match the two individual steppers and the orientation is inferred from the tag name. This will make it much easier to remove the deprecated directives. Furthermore, it should result in a smaller bundle since the template and styles only need to be inlined in one place. 2. `MatVerticalStepper` and `MatHorizontalStepper` are turned into very basic directives that have the same public API as `MatStepper` and they proxy everything to it. This is primarily so that if somebody managed to get a hold of a `MatVerticalStepper` or `MatHorizontalStepper` instance, or they used the old classes to type their own code, it wouldn't result in a breaking change. Relates to angular#7700.
…ly (#22139) Combines `mat-vertical-stepper` and `mat-horizontal-stepper` into a single `mat-stepper` class in order to allow for the orientation to be changed dynamically. Also deprecates `MatVerticalStepper` and `MatHorizontalStepper`. This is a reimplementation of #9173, however this time I took a different approach which should make it easier to maintain and eventually remove the two separate steppers. It should result in a smaller bundle as well. The main differences are: 1. Rather than have 3 components (`MatStepper`, `MatVerticalStepper` and `MatHorizontalStepper`), these changes combine everything into `MatStepper` while `MatVerticalStepper` and `MatHorizontalStepper` are only used as injection tokens for backwards compatibility. The `selector` and `exportAs` of `MatStepper` is changed to match the two individual steppers and the orientation is inferred from the tag name. This will make it much easier to remove the deprecated directives. Furthermore, it should result in a smaller bundle since the template and styles only need to be inlined in one place. 2. `MatVerticalStepper` and `MatHorizontalStepper` are turned into very basic directives that have the same public API as `MatStepper` and they proxy everything to it. This is primarily so that if somebody managed to get a hold of a `MatVerticalStepper` or `MatHorizontalStepper` instance, or they used the old classes to type their own code, it wouldn't result in a breaking change. Relates to #7700.
I believe that most of the suggestions here are now supported. I'll close the issue since these sorts of multi-feature-request issues tend to be difficult to follow. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Thanks for everyone who works on this project! I just upgraded to beta12 and am using the Stepper component now. I had a few proposals after using it for a bit. Please let me know what you think-I'd love to help contribute if we want any of these (:
Let me know what you think~
The text was updated successfully, but these errors were encountered: