gd-bs 6.9.17 → 6.9.19

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.
@@ -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
- // Remove the description
85
- this._el.removeChild(elDescription);
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) {