fix: Add missing dropdown method (#5830)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas
2022-11-09 17:27:04 -08:00
committed by GitHub
parent 4f82859bba
commit 865346223b

View File

@@ -22,7 +22,7 @@
:variant="isActive(option) ? 'hollow' : 'clear'" :variant="isActive(option) ? 'hollow' : 'clear'"
color-scheme="secondary" color-scheme="secondary"
:class="{ :class="{
active: option.id === (selectedItem && selectedItem.id), active: isActive(option),
}" }"
@click="() => onclick(option)" @click="() => onclick(option)"
> >
@@ -122,6 +122,9 @@ export default {
focusInput() { focusInput() {
this.$refs.searchbar.focus(); this.$refs.searchbar.focus();
}, },
isActive(option) {
return this.selectedItem ? option.id === this.selectedItem.id : false;
},
}, },
}; };
</script> </script>
@@ -197,6 +200,7 @@ export default {
justify-content: space-between; justify-content: space-between;
min-width: 0; min-width: 0;
width: 100%; width: 100%;
align-items: center;
} }
.name { .name {