gd-bs 6.6.88 → 6.6.90
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 +7 -0
- package/build/components/inputGroup/index.js +2 -2
- 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/index.ts +7 -0
- package/src/components/inputGroup/index.ts +2 -2
|
@@ -491,12 +491,17 @@ var _Dropdown = /** @class */ (function (_super) {
|
|
|
491
491
|
}
|
|
492
492
|
else {
|
|
493
493
|
var isForm = menu.nodeName == "SELECT";
|
|
494
|
+
var value = [];
|
|
494
495
|
// Parse the items
|
|
495
496
|
var items = this.props.items || [];
|
|
496
497
|
for (var i = 0; i < items.length; i++) {
|
|
497
498
|
// Create the item
|
|
498
499
|
var item = isForm ? new formItem_1.DropdownFormItem(items[i], this.props) : new item_1.DropdownItem(items[i], this.props);
|
|
499
500
|
this._items.push(item);
|
|
501
|
+
// See if this item is selected
|
|
502
|
+
if (item.isSelected) {
|
|
503
|
+
value.push(item.props.value || item.props.text);
|
|
504
|
+
}
|
|
500
505
|
// See if this isn't for a form
|
|
501
506
|
if (!isForm) {
|
|
502
507
|
// Configure the item events
|
|
@@ -505,6 +510,8 @@ var _Dropdown = /** @class */ (function (_super) {
|
|
|
505
510
|
// Add the item to the menu
|
|
506
511
|
menu.appendChild(item.el);
|
|
507
512
|
}
|
|
513
|
+
// Set the value
|
|
514
|
+
this.setValue(value);
|
|
508
515
|
// See if this is a form
|
|
509
516
|
if (isForm) {
|
|
510
517
|
// Ensure the selected values match the index
|
|
@@ -146,7 +146,7 @@ var _InputGroup = /** @class */ (function (_super) {
|
|
|
146
146
|
// Set the value
|
|
147
147
|
callbackValue_1 = elInput.value;
|
|
148
148
|
// Call the change event
|
|
149
|
-
_this.props.onChange(
|
|
149
|
+
_this.props.onChange(_this.getValue(), ev);
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
}
|
|
@@ -180,7 +180,7 @@ var _InputGroup = /** @class */ (function (_super) {
|
|
|
180
180
|
// Set the value
|
|
181
181
|
callbackValue_1 = currentValue;
|
|
182
182
|
// Call the events
|
|
183
|
-
_this.props.onChange ? _this.props.onChange(
|
|
183
|
+
_this.props.onChange ? _this.props.onChange(_this.getValue(), ev) : null;
|
|
184
184
|
_this.props.onClear && callbackValue_1 == "" ? _this.props.onClear() : null;
|
|
185
185
|
}
|
|
186
186
|
}
|