From 0cb28b2a8600f39889516125eef32a5855397bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Gon=C3=A7alves?= Date: Wed, 10 Jan 2024 16:33:16 -0300 Subject: [PATCH] refactor: remove the reference to showAvatar data in the SelectInner component in the tests here, it seems this variable is not necessary since we have the isAvatarVisible also, there was an watcher that set the isAvatarVisible value to the showAvatar --- .../Select/components/SelectInner.vue | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/components/Select/components/SelectInner.vue b/src/components/Select/components/SelectInner.vue index bc1862f1..507976e7 100644 --- a/src/components/Select/components/SelectInner.vue +++ b/src/components/Select/components/SelectInner.vue @@ -73,7 +73,7 @@ /> -
+
({ - showAvatar: false, - }), - computed: { dataTestid() { return this.$attrs['data-testid'] || 'sb-select-inner' @@ -318,8 +314,7 @@ export default { this.hasValue && !this.multiple && !this.searchInputText.length && - !this.isAvatarVisible && - !this.showAvatar + !this.isAvatarVisible ) }, @@ -430,16 +425,6 @@ export default { }, watch: { - searchInputText(val) { - if ( - this.avatarData && - val === this.avatarData?.label && - this.isAvatarVisible - ) { - this.showAvatar = true - } - }, - modelValue(val, oldVal) { const isSameValue = JSON.stringify(val) === JSON.stringify(oldVal) if (this.isSearchTextVisible && !isSameValue) { @@ -448,14 +433,6 @@ export default { } return } - - if (this.isAvatarVisible) { - this.showAvatar = true - } - }, - - isAvatarVisible(val) { - this.showAvatar = val }, },