gd-bs 6.6.10 → 6.6.11
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/package.json
CHANGED
|
@@ -396,7 +396,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
// Generates the checkbox value
|
|
399
|
-
private generateCheckboxValue(currentValues: string | string[]): string[] {
|
|
399
|
+
private generateCheckboxValue(currentValues: string | string[] | IDropdownItem[]): string[] {
|
|
400
400
|
let values: string[] = [];
|
|
401
401
|
|
|
402
402
|
// Ensure a value exists
|
|
@@ -410,15 +410,25 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
410
410
|
|
|
411
411
|
// Parse the current values
|
|
412
412
|
for (let i = 0; i < currentValues.length; i++) {
|
|
413
|
-
let
|
|
413
|
+
let currentValue = currentValues[i];
|
|
414
|
+
let currentItem:IDropdownItem = { };
|
|
415
|
+
|
|
416
|
+
// See if this is a string
|
|
417
|
+
if (typeof (currentValue) == "string") {
|
|
418
|
+
// Set the text property
|
|
419
|
+
currentItem.text = currentValue;
|
|
420
|
+
} else {
|
|
421
|
+
// Set the item
|
|
422
|
+
currentItem = currentValue;
|
|
423
|
+
}
|
|
414
424
|
|
|
415
425
|
// Find the item
|
|
416
426
|
let item = this.props.items?.find((item) => {
|
|
417
427
|
// Match by the text property if the value doesn't exist
|
|
418
|
-
if (typeof (item.value) === undefined) { return item.text ==
|
|
428
|
+
if (typeof (item.value) === undefined) { return item.text == currentItem.text; }
|
|
419
429
|
|
|
420
430
|
// See if the value property matches
|
|
421
|
-
return item.value == value;
|
|
431
|
+
return item.value == currentItem.value;
|
|
422
432
|
});
|
|
423
433
|
|
|
424
434
|
// See if an item was found
|