gd-bs 6.6.79 → 6.6.80

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.79",
3
+ "version": "6.6.80",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -535,8 +535,13 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
535
535
  // Ensure the selected values match the index
536
536
  let idx = (menu as HTMLSelectElement).selectedIndex;
537
537
  if (this._items[idx] && this._items[idx].isSelected == false) {
538
- // Select the item
539
- this._items[idx].toggle();
538
+ // Parse the items and ensure none are toggled
539
+ for (let i = 0; i < this._items.length; i++) {
540
+ // Ensure it's not selected
541
+ if (this._items[i].isSelected) { this._items[i].toggle(); }
542
+ // Else, toggle it if it's the selected item
543
+ else if (idx == i) { this._items[i].toggle(); }
544
+ }
540
545
  }
541
546
  }
542
547
  }