-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 without a form #8110
Comments
If a step doesn't contain a form, the following exception is thrown:
|
This should be possible already, can somebody confirm? It no longer throws an arrow when the EDIT: Just double-checked. While the |
… a step without a stepControl Currently we only consider a step's validation state when determining whether the user can move forward in a linear stepper, however this means that there's no way to block navigation without using Angular forms. These changes switch the logic so it considers the `completed` binding, if there is `stepControl`. Fixes angular#8110.
… a step without a stepControl (#9126) Currently we only consider a step's validation state when determining whether the user can move forward in a linear stepper, however this means that there's no way to block navigation without using Angular forms. These changes switch the logic so it considers the `completed` binding, if there is `stepControl`. Fixes #8110.
… a step without a stepControl (angular#9126) Currently we only consider a step's validation state when determining whether the user can move forward in a linear stepper, however this means that there's no way to block navigation without using Angular forms. These changes switch the logic so it considers the `completed` binding, if there is `stepControl`. Fixes angular#8110.
… a step without a stepControl (angular#9126) Currently we only consider a step's validation state when determining whether the user can move forward in a linear stepper, however this means that there's no way to block navigation without using Angular forms. These changes switch the logic so it considers the `completed` binding, if there is `stepControl`. Fixes angular#8110.
… a step without a stepControl (#9126) Currently we only consider a step's validation state when determining whether the user can move forward in a linear stepper, however this means that there's no way to block navigation without using Angular forms. These changes switch the logic so it considers the `completed` binding, if there is `stepControl`. Fixes #8110.
… a step without a stepControl (#9126) Currently we only consider a step's validation state when determining whether the user can move forward in a linear stepper, however this means that there's no way to block navigation without using Angular forms. These changes switch the logic so it considers the `completed` binding, if there is `stepControl`. Fixes #8110.
Sorry to comment on an already closed issue, but I think I get what @theunreal was aiming to, that is, to have a stepper that does not rely on form validators to be advanced. Check this stackblitz: https://stackblitz.com/edit/mat-horizontal-stepper?file=app%2Fapp.component.html I've marked the stepper as linear, and the first step as not optional, still, regardless of it, you can click and go to the step 2 at any time, without having to click the "compelte" button to mark step 1 as completed, also ot seen in there, when I try in my local environment to do the same I get the following error when clicking the complete button:
My use case is to have a stepper that on each step present the user certain options, and they have to select one of them with a button, then proceed to the following step, but not allow them to advance if there is no selection. If thsi is not possible I can think a redesign that uses forms but I really think I don't need to have forms for this use case, but I'm failing to achieve it so far. Please correct me if I'm using any component the wrong way. |
@Dannythm Looks like you need to bind to |
@Maistho Ah, so the properties can't be used directly, they need binding, oh well I feel dumb now. Anyway I'm glad it's something silly and not an actual non functionallity/bug. Thank you! |
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. |
Bug, feature request, or proposal:
Proposal
What is the expected behavior?
Assign a condition for a step to be completed manually (form-independent)
What is the current behavior?
No option to mark step as completed without a form
What is the use-case or motivation for changing an existing behavior?
Fit more use cases
Is there anything else we should know?
for example:
<mat-horizontal-stepper formArrayName="formArray" linear [completed]="items.length">
The text was updated successfully, but these errors were encountered: