gd-bs 6.6.62 → 6.6.63

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.62",
3
+ "version": "6.6.63",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -54,7 +54,7 @@ export class DropdownFormItem {
54
54
  // Else, see if a value exists
55
55
  else if (this._parent.value != undefined) {
56
56
  // Ensure it's an array
57
- let values = this._parent.value && typeof (this._parent.value) === "object" ? this._parent.value : [this._parent.value];
57
+ let values = this._parent.value && this._parent.value.length && typeof (this._parent.value) !== "string" ? this._parent.value : [this._parent.value];
58
58
 
59
59
  // Parse the values
60
60
  for (let i = 0; i < values.length; i++) {
@@ -434,7 +434,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
434
434
  if (currentValues == null) { return values; }
435
435
 
436
436
  // Ensure it's an array
437
- if (typeof (currentValues) !== "object") {
437
+ if (typeof (currentValues) === "string") {
438
438
  // Make it an array
439
439
  currentValues = [currentValues];
440
440
  }
@@ -445,7 +445,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
445
445
  let currentItem: IDropdownItem = {};
446
446
 
447
447
  // See if this is a string
448
- if (typeof (currentValue) !== "object") {
448
+ if (typeof (currentValue) == "string") {
449
449
  // Set the text and value properties
450
450
  currentItem.text = currentValue;
451
451
  currentItem.value = currentValue;
@@ -575,7 +575,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
575
575
  if (this._cb) {
576
576
  // Get the values
577
577
  let items = this._cb.getValue() as ICheckboxGroupItem[];
578
- items = typeof (items) === "object" ? items : [items];
578
+ items = typeof (items["length"]) === "number" ? items : [items] as any;
579
579
 
580
580
  // Parse the items
581
581
  for (let i = 0; i < items.length; i++) {
@@ -695,7 +695,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
695
695
  // Sets the dropdown value
696
696
  setValue(value) {
697
697
  // Ensure it's an array
698
- let values = value == null ? [] : (typeof (value) === "object" ? value : [value]);
698
+ let values = value == null ? [] : (typeof (value.length) === "number" && typeof (value) !== "string" ? value : [value]);
699
699
 
700
700
  // See if this is a checkbox
701
701
  if (this._cb) {
@@ -79,7 +79,7 @@ export class DropdownItem {
79
79
  // Else, see if a value exists
80
80
  else if (this._parent.value != undefined) {
81
81
  // Ensure it's an array
82
- let values = this._parent.value && typeof (this._parent.value) === "object" ? this._parent.value : [this._parent.value];
82
+ let values = this._parent.value && this._parent.value.length && typeof (this._parent.value) !== "string" ? this._parent.value : [this._parent.value];
83
83
 
84
84
  // Parse the values
85
85
  for (let j = 0; j < values.length; j++) {
@@ -127,7 +127,7 @@ export interface IDropdownItem {
127
127
  text?: string;
128
128
  title?: string;
129
129
  toggle?: string;
130
- value?: string | number | boolean;
130
+ value?: string;
131
131
  }
132
132
 
133
133
  /**