Allow MatSnackBarRef to be closed with an ActionValue
See original GitHub issueCurrently the Snackbar can only be dismiss
’ed or dismissWithAction
’ed. And the action cannot be passed! So if I have more than one action I need to store the result in a static scope (or am I mistaken?). Wouldn’t it make much more sense to just have a dismiss-method with an optional value parameter? Like the MatDialog has?
This dismiss / dismissWithAction thing really feels dusty …
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
How to dismiss/close an Angular Snackbar element from ...
You can do the following to achieve this. This snack-bar is like a mat-dialog .. you have to call the dismiss() on a...
Read more >Snackbar | Angular Material
In either case, a MatSnackBarRef is returned. This can be used to dismiss the snackbar or to receive notification of when the snackbar...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll add this for discussion in our next team meeting.
I think that it limited on purpose, because snack bars are meant primarily for simple pieces of information that go away automatically after a certain amount of time, not for passing data around.