-
Notifications
You must be signed in to change notification settings - Fork 2.1k
MDCSnackbarFoundation has a hide event, but no onDismissed callback #2916
Comments
Are you looking for the Though you raise an interesting point in that we might want to examine exposing the action handler consistently to the show and hide events. |
as far as I understand .hide is the global event and im my case it is
handled by Vue wrapper, I'm looking for function per message to be cohirent
with actionHandler.
actually I already implrmeted it, it it pretty trivial. but I'm pretty bad
in JS to make official PR.
…On Tue, Jun 12, 2018, 01:26 Kenneth G. Franqueiro ***@***.***> wrote:
Are you looking for the MDCSnackbar:hide event
<https://github.com/material-components/material-components-web/tree/master/packages/mdc-snackbar#handling-events>
?
Though you raise an interesting point in that we might want to examine
exposing the action handler consistently to the show and hide events.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2916 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABeALhCUN2NTRfFJIlmSivnaJEAJwuT6ks5t7u6CgaJpZM4UhRs2>
.
|
I'm going to track this so we can investigate the current balance of APIs. I can see where action and dismiss could be considered complements to each other, but I'm also unsure why snackbar was originally implemented with show/hide as DOM events on the snackbar element, while It would be helpful to know specifically what your usage flow looks like with snackbar - e.g. how are you reusing snackbar instances, and how diverse are the action / dismiss handlers? |
currently I'm using it in "item will be removed" snack. On dismiss event
app sends remove call to the model , undo button just resets the view
…On Mon, Jun 18, 2018, 22:51 Kenneth G. Franqueiro ***@***.***> wrote:
I'm going to track this so we can investigate the current balance of APIs.
I can see where action and dismiss could be considered complements to each
other, but I'm also unsure why snackbar was originally implemented with
show/hide as DOM events on the snackbar element, while actionHandler is a
passed-in callback; this seems inconsistent - i.e., why aren't they all
callbacks? Or why couldn't we simply emit a MDCSnackbar:action event,
too? I'd ideally like to expose an API that is consistent, but still
satisfies use cases easily.
It would be helpful to know specifically what your usage flow looks like
with snackbar - e.g. how are you reusing snackbar instances, and how
diverse are the action / dismiss handlers?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2916 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABeALp7UKstCkrLNt49kzT8Mr4KY6NSiks5t-ATUgaJpZM4UhRs2>
.
|
### Issues fixed * Fixes #4005 (via new `mdc-snackbar-viewport-margin()` mixin) * Fixes #3981 * Fixes #2916 (via new `MDCSnackbar:closing` and `MDCSnackbar:closed` events) * Fixes #2628 * Fixes #1466 (via new `close()` method) * Fixes #1398 * Fixes #1258 * Fixes #11 (the label now expands indefinitely to fit the text) * Refs #2813 ### Screenshots    BREAKING CHANGE: Snackbar's DOM and APIs have changed to match the latest design guidelines. See the Snackbar documentation for more information.
There is no user-defined callback to handle snackbar dismiss.
For comparison, Android has
Snackbar.Callback
.What MDC Web Version are you using?
0.34.0
What are the steps to reproduce the bug?
in docs
What is the expected behavior?
What is the actual behavior?
Right now it is not possible to respond to snackbar dismissing.
The text was updated successfully, but these errors were encountered: