@tagplus/components 4.7.9 → 4.7.12

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.9",
11
+ "version": "4.7.12",
12
12
  "main": "./dist/tp.common.js",
13
13
  "directories": {
14
14
  "lib": "src/lib"
@@ -519,10 +519,15 @@ export default {
519
519
 
520
520
  for (let i = 0; i <= this.cachedOptions.length - 1; i++) {
521
521
  const cachedOption = this.cachedOptions[i]
522
- const isEqual = isObject
523
- ? getValueByPath(cachedOption.value, this.valueKey) ===
524
- getValueByPath(value, this.valueKey)
525
- : cachedOption.value === value
522
+ let isEqual = false
523
+ if (isObject) {
524
+ isEqual = getValueByPath(cachedOption.value, this.valueKey) === getValueByPath(value, this.valueKey)
525
+ } else {
526
+ isEqual = cachedOption.value === value
527
+ if (initialLabel) {
528
+ cachedOption.label = initialLabel
529
+ }
530
+ }
526
531
 
527
532
  if (isEqual) {
528
533
  option = cachedOption