Comments (4)
Yes @Herve-M you're right setting 0ms as duration value doesn't make it infinite.
https://carlosroso.com/notyf/ on their this demo website setting duration to null value makes it infinite
But yes creators eventually need to fix this ASAP.
Thanks,
shubham
from notyf.
Has this been fixed? Or has anything been looked at? I may be looking for an alternative as the bug fixes and such seem lacking
from notyf.
Same. I was looking for a "sticky" option
from notyf.
I think something like this could work.
private _pushNotification(notification: NotyfNotification) {
this.notifications.push(notification);
const duration =
notification.options.duration !== undefined ? notification.options.duration : this.options.duration;
if (duration && duration > 0) {
setTimeout(() => this._removeNotification(notification), duration);
}
}
This will check if the duration is greater than 0 before setting the timeout. If the duration is 0 or less, the timeout will not be set and the notification will not be removed from the DOM.
from notyf.
Related Issues (20)
- Using long text
- Link to the documentation flag as insecure HOT 1
- [Feature Request] Config option for a custom node to attach toast notifications HOT 2
- How to make a notification appear only once HOT 2
- Website SSL certificate expired HOT 2
- I don't know how to properly set the position value on vue? HOT 1
- Will this work inside of a shadow DOM? HOT 1
- How to make the notification called only once. And he didn't write it into the document every time he called.
- Is there a way to set position per call ? HOT 1
- esc key
- I want to change the z-index.
- Different position moves existing notifications
- All of my styling dosent work (vuejs(composition api) ,tailwindcss)
- Icons don't display on warn, info type
- Long text creates curve?
- Uncaught (in promise) TypeError: notyf is undefined HOT 1
- Pause timer when the window loses focus
- Add "style" attribute to package.json
- dismiss button does not have an accessible name
- When toast hidden time, need to callback some other function?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notyf.