Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS Notification: no duration for danger #406

Closed
mLicorn opened this issue Jun 7, 2023 · 2 comments
Closed

JS Notification: no duration for danger #406

mLicorn opened this issue Jun 7, 2023 · 2 comments

Comments

@mLicorn
Copy link

mLicorn commented Jun 7, 2023

Hi,

'Danger' type notifications close directly after display.
While reading the source code I noticed that the parameters of the 'danger' method are not the same as for the others: the duration is missing.

// show notification from JS
Toast.danger('message', 'title');

// source code
...
window.Toast = {
  ...
  warning (message, title = '', duration = undefined) {
       this.component.add(this.make(message, title, 'warning', duration ?? this.component.defaultDuration));
  },
  // no duration
  danger (message, title = '') {
        // no defaultDuration
        this.component.add(this.make(message, title, 'danger'));
   }
}
@usernotnull
Copy link
Owner

Hey @mLicorn,

Thanks for bringing this to my attention.
This was a PR I didn't fully test, and it went through.
I will fix it ASAP.

Cheers.

@usernotnull
Copy link
Owner

Fixed and released v1.7.1
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants