@tagplus/components 4.7.15 → 4.8.0

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
@@ -8,7 +8,7 @@
8
8
  "email": "bruno@tagplus.com.br"
9
9
  }
10
10
  ],
11
- "version": "4.7.15",
11
+ "version": "4.8.0",
12
12
  "main": "./dist/tp.common.js",
13
13
  "directories": {
14
14
  "lib": "src/lib"
@@ -279,7 +279,8 @@ export default {
279
279
 
280
280
  data () {
281
281
  return {
282
- tooltipVisible: false
282
+ tooltipVisible: false,
283
+ modifiedLabel: null
283
284
  }
284
285
  },
285
286
 
@@ -478,11 +479,6 @@ export default {
478
479
  }
479
480
  },
480
481
 
481
- /** Atualiza a label de algum dos elementos da listagem do altosuggest */
482
- atualizarLabelOpcao (index, val) {
483
- this.suggestionsList[index][this.labelKey] = val
484
- },
485
-
486
482
  /**
487
483
  * Sobrescreve o getOption do select para mostrar o labelValue em vez do idValue
488
484
  */
@@ -529,8 +525,8 @@ export default {
529
525
  isEqual = getValueByPath(cachedOption.value, this.valueKey) === getValueByPath(value, this.valueKey)
530
526
  } else {
531
527
  isEqual = cachedOption.value === value
532
- if (initialLabel && isEqual) {
533
- this.atualizarLabelOpcao(i, initialLabel)
528
+ if (initialLabel) {
529
+ this.modifiedLabel = initialLabel
534
530
  }
535
531
  }
536
532
 
@@ -545,7 +541,7 @@ export default {
545
541
  const label = !isObject && !isNull && !isUndefined ? value : ''
546
542
  const newOption = {
547
543
  value,
548
- currentLabel: initialLabel || label
544
+ currentLabel: this.modifiedLabel || label
549
545
  }
550
546
 
551
547
  if (this.multiple) {
@@ -554,6 +550,7 @@ export default {
554
550
 
555
551
  return newOption
556
552
  },
553
+
557
554
  checkDefaultFirstOption () {
558
555
  this.$nextTick(() => {
559
556
  this.hoverIndex = -1