-
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
feat(cdk-stepper): change orientation on runtime or expose key manager property #21874
feat(cdk-stepper): change orientation on runtime or expose key manager property #21874
Comments
Currently we have a limitation on the Material stepper that doesn't allow its orientation to be changed dynamically, because we have two different components for it. The CDK stepper doesn't have this limitation and people may end up extending it to implement their own steppers which support changing orientations. These changes add some logic to ensure that changing the orientation works as expected and to ensure that the orientation of the Material stepper doesn't change. Fixes angular#21874.
I've submitted #21940 which adds a getter/setter to the
|
Currently we have a limitation on the Material stepper that doesn't allow its orientation to be changed dynamically, because we have two different components for it. The CDK stepper doesn't have this limitation and people may end up extending it to implement their own steppers which support changing orientations. These changes add some logic to ensure that changing the orientation works as expected and to ensure that the orientation of the Material stepper doesn't change. Fixes #21874.
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. |
Feature Description
Make it possible to change the orientation between horizontal and vertical during runtime. This could also be made possible by exposing the current
private _keyManager
property either by making it protected or providing a public getter/method so that the consumer of the CdkStepper can manage that on their own.Use Case
In our case we want to be able to switch between vertical and horizontal orientation on a single component via an Input. Switching orientation should have some effects, most importantly that keyboard controls should be different (UP and DOWN arrows for vertical orientation).
In the current implementation and how it is implemented in material that is done by two separate components that explicitly set the
_orientation
property and setting the keymanager up in thengAfterViewInit
hook.Pseudo Code what we'd like to do:
Right now I think just changing the orientation in the keyManager should be enough, even nicer would be that the CdkStepper would already support setting the
_orientation
property dynamically, but I'd understand if you don't want to support that inside the CdkStepper. In this case exposing the keyManager would give us as the consumer the possibility at our own risk to implement this feature and not being forced into doing two separate components.What do you think? I am happy to open a PR if you want to support that use case.
The text was updated successfully, but these errors were encountered: