@eturnity/eturnity_reusable_components 1.1.45 → 1.1.46

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": "@eturnity/eturnity_reusable_components",
3
- "version": "1.1.45",
3
+ "version": "1.1.46",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -525,15 +525,20 @@ export default {
525
525
  this.$emit("custom-input-change", event)
526
526
  },
527
527
  setDropdownWidth(options) {
528
+ this.dynamicWidth = []
528
529
  options.map((item) => {
529
530
  this.optionsDisplay.map((header, index) => {
530
531
  let value =
531
532
  header === "template"
532
533
  ? this.$gettext("No main component template")
533
534
  : item[header]
535
+
536
+ value = !!value ? value : ""
537
+
534
538
  if (
535
- this.dynamicWidth.length < this.optionsDisplay.length ||
536
- value.length > this.dynamicWidth[index]
539
+ this.optionsDisplay.length &&
540
+ (this.dynamicWidth.length < this.optionsDisplay.length ||
541
+ value.length > this.dynamicWidth[index])
537
542
  ) {
538
543
  this.dynamicGridWidth[index] = value.length + "ch"
539
544
  this.dynamicWidth[index] = value.length
@@ -564,14 +569,10 @@ export default {
564
569
  }
565
570
  },
566
571
  optionItems(val) {
567
- console.log("optionItems", val)
568
- if (val.length) {
572
+ if (val && val.length) {
569
573
  this.setDropdownWidth(val)
570
574
  }
571
575
  },
572
576
  },
573
- mounted() {
574
- console.log("optionsDisplay", this.optionsDisplay)
575
- },
576
577
  }
577
578
  </script>