fix: Search improvements and bug fixes [CW-1604] (#6985)

* fix: Search improvements and bug fixes

* Resets tab to all on search

* Fix index bug with tabs

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
Nithin David Thomas
2023-04-27 13:20:29 +05:30
committed by GitHub
parent 04da8aa8dc
commit c0e905b5d8
4 changed files with 37 additions and 8 deletions

View File

@@ -18,12 +18,23 @@ export default {
type: Array,
default: () => [],
},
selectedTab: {
type: Number,
default: 0,
},
},
data() {
return {
activeTab: 0,
};
},
watch: {
selectedTab(value, oldValue) {
if (value !== oldValue) {
this.activeTab = this.selectedTab;
}
},
},
methods: {
onTabChange(index) {
this.activeTab = index;