gd-bs 6.6.16 → 6.6.18
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/formItem.js +7 -0
- package/build/components/dropdown/item.js +2 -0
- package/build/components/tooltip/index.js +8 -6
- 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/package.json +1 -1
- package/src/components/dropdown/formItem.ts +9 -0
- package/src/components/dropdown/item.ts +3 -0
- package/src/components/tooltip/index.ts +8 -6
package/package.json
CHANGED
|
@@ -17,6 +17,9 @@ export class DropdownFormItem {
|
|
|
17
17
|
|
|
18
18
|
// Configure the item
|
|
19
19
|
this.configure();
|
|
20
|
+
|
|
21
|
+
// Configure the events
|
|
22
|
+
this.configureEvents();
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
// Configures the item
|
|
@@ -71,6 +74,12 @@ export class DropdownFormItem {
|
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
76
|
|
|
77
|
+
// Configures the events
|
|
78
|
+
private configureEvents() {
|
|
79
|
+
// Call the render event
|
|
80
|
+
this._props.onRender ? this._props.onRender(this._el, this._props) : null;
|
|
81
|
+
}
|
|
82
|
+
|
|
74
83
|
/**
|
|
75
84
|
* Public Interface
|
|
76
85
|
*/
|
|
@@ -80,11 +80,11 @@ class _Tooltip extends Base<ITooltipProps> {
|
|
|
80
80
|
this._ddl = Dropdown(ddlProps);
|
|
81
81
|
|
|
82
82
|
// Update the element
|
|
83
|
-
this.el = this._ddl.el;
|
|
83
|
+
this.el = this._ddl.el.querySelector("button");
|
|
84
84
|
} else {
|
|
85
85
|
// Default the toggle property for the button
|
|
86
86
|
let btnProps = this.props.btnProps || {};
|
|
87
|
-
btnProps.type = btnProps.type || ButtonTypes.
|
|
87
|
+
btnProps.type = btnProps.type || ButtonTypes.OutlinePrimary
|
|
88
88
|
|
|
89
89
|
// See if the content is text
|
|
90
90
|
if (typeof (this.props.content) === "string") {
|
|
@@ -216,10 +216,12 @@ class _Tooltip extends Base<ITooltipProps> {
|
|
|
216
216
|
// Set the default theme
|
|
217
217
|
theme = "secondary";
|
|
218
218
|
|
|
219
|
-
// See if a button exists
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
// See if a button/dropdown exists
|
|
220
|
+
let objType = this.props.btnProps && this.props.btnProps.type > 0 ? this.props.btnProps.type : null;
|
|
221
|
+
objType = this.props.ddlProps && this.props.ddlProps.type > 0 ? this.props.ddlProps.type : objType;
|
|
222
|
+
if (objType > 0) {
|
|
223
|
+
// Match the theme to the button/dropdown type
|
|
224
|
+
switch (objType) {
|
|
223
225
|
// Danger
|
|
224
226
|
case ButtonTypes.Danger:
|
|
225
227
|
case ButtonTypes.OutlineDanger:
|