Skip to content

Bug: Snackbar missing public action method for custom snackbars #5657

@mtpultz

Description

@mtpultz

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Be able to close a custom snackbar using a public method to indicate action was used, and allow for use of onAction observable

What is the current behavior?

When you create a custom snackbar using openFromComponent you can pass in a snackBarRef and invoke any methods on self, but there is no public version of _action() so if you create a component and a user clicks your action you have to use a private method to be able to distinguish an action/dismiss or just a dismiss

What are the steps to reproduce?

N/A missing API call

What is the use-case or motivation for changing an existing behavior?

Snackbar's have two ways they can be closed, but right now in order to use the onAction observable you need to invoke a private method _action()

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.2.5, Angular Materila 2.0.0-beta.8, Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionshelp wantedThe team would appreciate a PR from the community to address this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions