From 865346223be551cbc5b9ace2d6766937eea9aa94 Mon Sep 17 00:00:00 2001 From: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com> Date: Wed, 9 Nov 2022 17:27:04 -0800 Subject: [PATCH] fix: Add missing dropdown method (#5830) Co-authored-by: Pranav Raj S --- .../shared/components/ui/MultiselectDropdownItems.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/shared/components/ui/MultiselectDropdownItems.vue b/app/javascript/shared/components/ui/MultiselectDropdownItems.vue index a14acd282..513407544 100644 --- a/app/javascript/shared/components/ui/MultiselectDropdownItems.vue +++ b/app/javascript/shared/components/ui/MultiselectDropdownItems.vue @@ -22,7 +22,7 @@ :variant="isActive(option) ? 'hollow' : 'clear'" color-scheme="secondary" :class="{ - active: option.id === (selectedItem && selectedItem.id), + active: isActive(option), }" @click="() => onclick(option)" > @@ -122,6 +122,9 @@ export default { focusInput() { this.$refs.searchbar.focus(); }, + isActive(option) { + return this.selectedItem ? option.id === this.selectedItem.id : false; + }, }, }; @@ -197,6 +200,7 @@ export default { justify-content: space-between; min-width: 0; width: 100%; + align-items: center; } .name {