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
package/package.json
CHANGED
|
@@ -504,6 +504,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
504
504
|
});
|
|
505
505
|
} else {
|
|
506
506
|
let isForm = menu.nodeName == "SELECT";
|
|
507
|
+
let value: string[] = [];
|
|
507
508
|
|
|
508
509
|
// Parse the items
|
|
509
510
|
let items = this.props.items || [];
|
|
@@ -512,6 +513,9 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
512
513
|
let item = isForm ? new DropdownFormItem(items[i], this.props) : new DropdownItem(items[i], this.props);
|
|
513
514
|
this._items.push(item);
|
|
514
515
|
|
|
516
|
+
// See if this item is selected
|
|
517
|
+
if (item.isSelected) { value.push(item.props.value || item.props.text); }
|
|
518
|
+
|
|
515
519
|
// See if this isn't for a form
|
|
516
520
|
if (!isForm) {
|
|
517
521
|
// Configure the item events
|
|
@@ -522,6 +526,9 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
522
526
|
menu.appendChild(item.el);
|
|
523
527
|
}
|
|
524
528
|
|
|
529
|
+
// Set the value
|
|
530
|
+
this.setValue(value);
|
|
531
|
+
|
|
525
532
|
// See if this is a form
|
|
526
533
|
if (isForm) {
|
|
527
534
|
// Ensure the selected values match the index
|
|
@@ -141,7 +141,7 @@ class _InputGroup extends Base<IInputGroupProps> implements IInputGroup {
|
|
|
141
141
|
callbackValue = elInput.value;
|
|
142
142
|
|
|
143
143
|
// Call the change event
|
|
144
|
-
this.props.onChange(
|
|
144
|
+
this.props.onChange(this.getValue(), ev);
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -180,7 +180,7 @@ class _InputGroup extends Base<IInputGroupProps> implements IInputGroup {
|
|
|
180
180
|
callbackValue = currentValue;
|
|
181
181
|
|
|
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 == "" ? this.props.onClear() : null;
|
|
185
185
|
}
|
|
186
186
|
}
|