gd-bs 6.6.84 → 6.6.86
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 +1 -9
- package/build/components/listBox/index.js +4 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +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 +1 -9
- package/src/components/listBox/index.ts +4 -1
- package/src/components/listBox/types.d.ts +1 -1
package/package.json
CHANGED
|
@@ -455,15 +455,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
// Find the item
|
|
458
|
-
let item = this.props.items?.find((item) => {
|
|
459
|
-
// Match by the text property if the value doesn't exist
|
|
460
|
-
if (typeof (item.value) === undefined) { return item.text == currentItem.text; }
|
|
461
|
-
|
|
462
|
-
// See if the value property matches
|
|
463
|
-
return item.value == currentItem.value;
|
|
464
|
-
});
|
|
465
|
-
|
|
466
|
-
// See if an item was found
|
|
458
|
+
let item = this.props.items?.find((item) => { return item.value == currentValue || item.text == currentValue; });
|
|
467
459
|
if (item) {
|
|
468
460
|
// Add the text property
|
|
469
461
|
values.push(item.text);
|
|
@@ -198,7 +198,10 @@ class _ListBox extends Base<IListBoxProps> implements IListBox {
|
|
|
198
198
|
*/
|
|
199
199
|
|
|
200
200
|
// Gets the selected items
|
|
201
|
-
getValue() {
|
|
201
|
+
getValue() {
|
|
202
|
+
// Return the value
|
|
203
|
+
return this.props.multi ? this._selectedItems : this._selectedItems[0];
|
|
204
|
+
}
|
|
202
205
|
|
|
203
206
|
// Sets the options
|
|
204
207
|
setOptions(items: Array<IDropdownItem> = []) {
|
|
@@ -81,7 +81,7 @@ export interface IListBox extends IBase<IListBoxProps> {
|
|
|
81
81
|
el: HTMLElement;
|
|
82
82
|
|
|
83
83
|
/** The selected listbox items. */
|
|
84
|
-
getValue: () => Array<IDropdownItem>;
|
|
84
|
+
getValue: () => IDropdownItem | Array<IDropdownItem>;
|
|
85
85
|
|
|
86
86
|
/** Sets the options */
|
|
87
87
|
setOptions: (items: Array<IDropdownItem>) => void;
|