Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Is it possible to have the sidenav open by default ? #215

Closed
noam1610 opened this issue Oct 1, 2017 · 2 comments
Closed

Is it possible to have the sidenav open by default ? #215

noam1610 opened this issue Oct 1, 2017 · 2 comments

Comments

@noam1610
Copy link

noam1610 commented Oct 1, 2017

In the documentation there is no property that say if the sidenav is shown or not.
Is there a simple way to handle it from the .ts ?

Thank you

@jfcere
Copy link
Contributor

jfcere commented Oct 2, 2017

Hi @noam1610,

You are right, there is no property exposed on the sidenav component that says if it is opened or closed. Materialize added onOpen and onClose callback in version 0.99.0 which we are going to add in a near futur to the sidenav component. That way you'll have a hook on those events.

We're going to take a look if we can add this feature for the 1.6.0 release that is planned soon.

We'll keep you in touch!

@jfcere
Copy link
Contributor

jfcere commented Oct 23, 2017

@noam1610 onOpen and onClose callbacks have been added and I aslo added a opened state that will allow to tell you if the sidenav is opened or not. You will also be able to toggle the sidenav by changing the boolean value of the state.

This should be available in the next release.

For the part "Is it possible to have the sidenav open by default", you would need to toggle it manually in ngAfterViewInit or if you want it fixed you can use the fixed property on mz-sidenav. You can follow the documentation if you want to have it fixed in large resolution and toggleable in smaller resolution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants