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.

(Feature) Notification - allow closing using code

See original GitHub issue

Is your feature request related to a problem? Please describe.

My use case is that in certain scenarios I open a notification with Duration = 0. This makes the notification visible until the user closes it or refreshes the page. However, I would like to be able to close the notification using code, especially when some of the conditions change.

Describe the solution you’d like

When calling notification, an interface could be returned that would allow me run .Close() or .Dismiss() or alike method.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zxyao145commented, May 6, 2021

At present, Notification conponment is originally migrated from Ant Design of React. I think it should have the characteristics of Ant Design Blazor. It should be a good choice to return a Ref object with close, update and other methods. And inherited from IFeedbackref, this seems to be a good choice. The implementation of OpenAsync method may be a bit difficult, but it can be done.

0reactions
zxyao145commented, Jun 3, 2021

My notification never closes, even if I put a timeout. This happens when I call the notification from a modal image

@georgeemr Hi, how do you use it? Do you have sample code?

Read more comments on GitHub >

github_iconTop Results From Across the Web

dialog - Javascript close alert box
I want to be able to close an alert box automatically using Javascript after a certain amount of time or on a specific...
Read more >
Using the Notifications API - MDN Web Docs
Use close () to remove a notification that is no longer relevant to the user (e.g. the user already read the notification on...
Read more >
Notification - Web APIs - MDN Web Docs - Mozilla
Chrome Edge Notification Full support. Chrome20. footnote. Toggle history Full support. Edg... Notification() constructor Full support. Chrome20. Toggle history Full support. Edg... actions. Experimental Full support....
Read more >
Control notifications on Android
Turn on snoozing. Open your device's Settings app. Tap Notifications. Turn on Allow notification snoozing. Snooze a notification ... . Then, to act...
Read more >
Block all website notifications on Chrome with these ...
Don't suffer through the process of closing multiple pop-ups to read content online. Instead, use these extensions to block all website notifications on ......
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