gd-bs 6.9.17 → 6.9.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/form/control.js +11 -0
- package/build/components/form/group.js +2 -3
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +3 -3
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/form/control.ts +11 -0
- package/src/components/form/controlTypes.d.ts +3 -3
- package/src/components/form/group.ts +3 -4
- package/typedoc.json +7 -1
|
@@ -13,6 +13,7 @@ export class FormControl {
|
|
|
13
13
|
this._cb = null;
|
|
14
14
|
this._custom = null;
|
|
15
15
|
this._el = null;
|
|
16
|
+
this._elDesc = null;
|
|
16
17
|
this._elLabel = null;
|
|
17
18
|
this._formProps = null;
|
|
18
19
|
this._ddl = null;
|
|
@@ -684,6 +685,16 @@ export class FormControl {
|
|
|
684
685
|
}
|
|
685
686
|
// The form control properties
|
|
686
687
|
get props() { return this._props; }
|
|
688
|
+
// Sets the description of the control
|
|
689
|
+
setDescription(value) {
|
|
690
|
+
var _a, _b;
|
|
691
|
+
// Get the element
|
|
692
|
+
let elDesc = (_b = (_a = this._el) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.querySelector(".form-text");
|
|
693
|
+
if (elDesc) {
|
|
694
|
+
// Update the description
|
|
695
|
+
elDesc.innerHTML = value || "";
|
|
696
|
+
}
|
|
697
|
+
}
|
|
687
698
|
// Sets the form control label
|
|
688
699
|
setLabel(value) {
|
|
689
700
|
// Update the label
|
|
@@ -81,9 +81,8 @@ export class FormGroup {
|
|
|
81
81
|
elDescription.innerHTML = description;
|
|
82
82
|
}
|
|
83
83
|
else {
|
|
84
|
-
//
|
|
85
|
-
|
|
86
|
-
elDescription = null;
|
|
84
|
+
// Hide the description
|
|
85
|
+
elDescription === null || elDescription === void 0 ? void 0 : elDescription.classList.add("d-none");
|
|
87
86
|
}
|
|
88
87
|
// Set the class name
|
|
89
88
|
if (this._props.className) {
|