gd-bs 6.3.1 → 6.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.html CHANGED
@@ -192,7 +192,7 @@
192
192
  body: "This is the body of the toast.",
193
193
  mutedText: "2 seconds ago",
194
194
  options: {
195
- autohide: false
195
+ autohide: true
196
196
  }
197
197
  });
198
198
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.3.1",
3
+ "version": "6.3.2",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -8,7 +8,6 @@ import { HTML } from "./templates";
8
8
  * @param props - The toast properties.
9
9
  */
10
10
  class _Toast extends Base<IToastProps> implements IToast {
11
-
12
11
  // Constructor
13
12
  constructor(props: IToastProps, template: string = HTML) {
14
13
  super(template, props);
@@ -103,6 +102,12 @@ class _Toast extends Base<IToastProps> implements IToast {
103
102
  this.props.onClick(this.el, this.props.data);
104
103
  });
105
104
  }
105
+
106
+ // See if we are auto-hiding this toast
107
+ if (this.props.options && this.props.options.autohide) {
108
+ // Wait for the delay
109
+ setTimeout(this.hide.bind(this), this.props.options.delay || 5000);
110
+ }
106
111
  }
107
112
 
108
113
  /**