question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Snackbar notification leaves message on page

See original GitHub issue

Bug:

When I invoke Snackbar, the message appears both in a floating box and as text, just above the snackbar. image

After the snackbar disappears, the text remains on the page.

What is the expected behavior?

When the snackbar is invoked, the text that appears on the page should not be shown.

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

“angular-cli”: “^1.0.0-beta.24” “hammerjs”: “^2.0.8”, “@angular/core”: “^2.3.1”, “@angular/forms”: “^2.3.1” “@angular/material”: “^2.0.0-beta.1”

Chrome

Is there anything else we should know?

I created a service: `@Injectable() export class NotificationService { private _snackBarConfig: MdSnackBarConfig;

constructor(public snackBar: MdSnackBar) {
    this._snackBarConfig = new MdSnackBarConfig();

    this._snackBarConfig.duration = 10000;
}

public callSnackBar(message: string) {
    this.snackBar.open(message, null, this._snackBarConfig);
}`

Then, when I call it: `this._msgNotification = "The system did not return any " + “tenants. You’re session may have expired. Please login, again.”;

                    this._notifService.callSnackBar(this._msgNotification);`

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
largeDachshundcommented, Jan 4, 2017

yes. consider it resolved. there should be some explanation on Snackbar that theming is required.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The problem with snackbars and toast messages - Adam Silver
# It's been sent and you can't undo the send. After 5 seconds 'Undo' disappears, which leaves the user with the ability to...
Read more >
Snackbar / Toast Notifications in React Tutorial - YouTube
In this video I will teach you all how to code a snackbar in reactjs.
Read more >
Using React Native Snackbar to create custom pop-up ...
Let's explore Snackbar, a useful React Native tool that can help you add notifications or display pop-up messages in your application.
Read more >
How do I fire a snackbar notice in admin?
"This is my custom message.", // Text string to display. { type: "snackbar", isDismissible: true, // Whether the user can dismiss the notice...
Read more >
Snackbars - Material Design
Snackbars inform users of a process that an app has performed or will perform. They appear temporarily, towards the bottom of the screen....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found