gd-bs 5.4.3 → 5.4.6

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.
@@ -115,8 +115,9 @@ var DropdownItem = /** @class */ (function () {
115
115
  this._el.addEventListener("click", function (ev) {
116
116
  // Prevent the page from moving to the top
117
117
  ev.preventDefault();
118
- // See if we are selecting items
119
- if (_this._parent.autoSelect) {
118
+ // See if we are automatically selecting items
119
+ var autoSelect = typeof (_this._parent.autoSelect) === "boolean" ? _this._parent.autoSelect : true;
120
+ if (autoSelect) {
120
121
  // Toggle the item
121
122
  _this.toggle();
122
123
  }
@@ -100,24 +100,34 @@ var _Form = /** @class */ (function (_super) {
100
100
  // Append controls to the form
101
101
  _Form.prototype.appendControls = function (controls) {
102
102
  if (controls === void 0) { controls = []; }
103
+ var addedControls = [];
103
104
  // Parse the controls
104
105
  for (var i = 0; i < controls.length; i++) {
105
106
  // Create the group
106
107
  var group = new group_1.FormGroup(controls[i], this.props);
107
108
  this._groups.push(group);
108
109
  this.el.appendChild(group.el);
110
+ // Append the control
111
+ addedControls.push(group.control);
109
112
  }
113
+ // Return the controls
114
+ return addedControls;
110
115
  };
111
116
  // Append rows to the form
112
117
  _Form.prototype.appendRows = function (rows) {
113
118
  if (rows === void 0) { rows = []; }
119
+ var addedControls = [];
114
120
  // Parse the rows
115
121
  for (var i = 0; i < rows.length; i++) {
116
122
  // Create the row
117
123
  var row = new row_1.FormRow(rows[i], this.props);
118
124
  this._rows.push(row);
119
125
  this.el.appendChild(row.el);
126
+ // Append the control
127
+ addedControls = addedControls.concat(row.controls);
120
128
  }
129
+ // Return the controls
130
+ return addedControls;
121
131
  };
122
132
  Object.defineProperty(_Form.prototype, "controls", {
123
133
  // The forms controls