Skip to content

4.1.2

Latest
Compare
Choose a tag to compare
@PeytonRG PeytonRG released this 17 Sep 20:14
· 1 commit to v4-dev since this release

New Features

  1. Bootstrap Toaster is now written in TypeScript for proper type safety and access modifiers when used with other TS code.
  2. Toast timers now support a new option, countdown timers, in addition to elapsed timers and being disabled. A countdown timer simply displays how long in seconds until the toast disappears. Be aware that even with numbers greater than 60s, it will always display in seconds.
    • Elapsed timers are still the default setting.
  3. Toasts will now queue by default when the maximum toast count is reached, so that information in the queued toasts is not lost forever. This can be disabled to restore the previous behavior.

Breaking Changes

  1. There are new interfaces and enums available in the TypeScript code, which are now used as the parameters to the configure, create, setPlacement, setTheme, enableTimers.
    • For regular JavaScript users, simply pass in an object with the same properties as the new interfaces. Once compiled, the enums behave identically to prior versions, so no issues should arise there.
    • To upgrade, either use the interfaces/objects, or use the new temporary shims, oldConfigure, oldCreate, and oldEnableTimers, which have the same signatures as in previous releases. Unfortunately, JavaScript has no concept of method overloads, so this isn't entirely painless.
      • These shims will all be removed in a future version.
  2. Apologies for completely changing the signatures of multiple methods, but I think it is ultimately a more elegant solution that scales better going forward.