From cb27e81b7c712a51263815f78360868bdc7121ff Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sun, 2 Mar 2025 14:42:25 -0500 Subject: [PATCH] Fix search bar behaviour (step 6) --- .../src/components/general/VMSearchBar.vue | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pvc-vue/src/components/general/VMSearchBar.vue b/pvc-vue/src/components/general/VMSearchBar.vue index df36920..0091e45 100644 --- a/pvc-vue/src/components/general/VMSearchBar.vue +++ b/pvc-vue/src/components/general/VMSearchBar.vue @@ -5,13 +5,12 @@ class="btn btn-outline-secondary list-toggle-btn" @click="toggleList" :class="{ - 'active': showList, - 'filtering': showList && isFilterActive + 'active': showList && !isFilterActive, + 'filtering': showList && isFilterActive }" - :title="showList ? (isFilterActive ? 'Show all VMs' : 'Filter VMs') : 'List VMs'" + :title="showList ? (isFilterActive ? 'Show all VMs' : 'Filter VMs') : 'Show VM list'" > - - {{ showList ? (isFilterActive ? 'Filtering' : 'All VMs') : 'List VMs' }} + List VMs