gd-bs 6.3.0 → 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/build/components/dropdown/index.js +2 -1
- package/build/components/toast/index.js +5 -0
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/index.html +3 -3
- package/package.json +1 -1
- package/src/components/dropdown/index.ts +3 -1
- package/src/components/toast/index.ts +6 -1
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:
|
|
195
|
+
autohide: true
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
|
|
@@ -706,9 +706,9 @@
|
|
|
706
706
|
}]
|
|
707
707
|
});
|
|
708
708
|
window["ddl"] = GD.Components.Dropdown({
|
|
709
|
-
autoSelect:
|
|
709
|
+
autoSelect: true,
|
|
710
710
|
el: document.querySelector("#ddl"),
|
|
711
|
-
isSplit:
|
|
711
|
+
isSplit: false,
|
|
712
712
|
label: "My Dropdown",
|
|
713
713
|
onChange: function(item, ev) {
|
|
714
714
|
alert("Selected Item: " + (item ? item.text : "None"));
|
package/package.json
CHANGED
|
@@ -255,7 +255,6 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
255
255
|
options: {
|
|
256
256
|
arrow: false,
|
|
257
257
|
trigger: "click",
|
|
258
|
-
content: this._elMenu,
|
|
259
258
|
offset: [0, 4]
|
|
260
259
|
}
|
|
261
260
|
};
|
|
@@ -265,6 +264,9 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
265
264
|
|
|
266
265
|
// Create a popover to display the menu
|
|
267
266
|
this._popover = Popover(props);
|
|
267
|
+
|
|
268
|
+
// Set the popover content
|
|
269
|
+
this._popover.setContent(this._elMenu);
|
|
268
270
|
}
|
|
269
271
|
}
|
|
270
272
|
|
|
@@ -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
|
/**
|