-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Sidenav closes with Esc #1172
Comments
Hi @maghidini, are you willing to open a PR with your fix? 😄 |
The following material sample contains anything needed to capture escape and backdrop click to dispatch the close event. Altenatively you can listen to the openedChange event. |
Hi all, The example linked by @manklu looks nice, but cannot be easily applied into the code as far as I can say. This is due to the fact that you need I created #1244 which fixed this by applying |
dump/smart component convention, now dispatching the closing action in the containter component (app.component) See: ngrx#1172
Looks good to me 👍 |
Once you open the sidenav and closes it with Esc, after there is no way to re-open it, since the action
LayoutActions.OpenSidenav()
hasn't been dispatched. One quick fix is adding attributedisableClose
onmat-sidenav
element intosidenav.component.ts
leaving:<mat-sidenav [opened]="open" disableClose>
The text was updated successfully, but these errors were encountered: