fix(fe): twice loading templates

This commit is contained in:
Denis Gukov 2021-10-28 00:55:28 +05:00
parent 001ddd3ae3
commit 2a57122c4c

View File

@ -290,7 +290,11 @@ export default {
},
async onViewTabSelected(tabIndex) {
this.viewId = tabIndex >= this.views.length ? null : this.views[tabIndex].id;
const newViewId = tabIndex >= this.views.length ? null : this.views[tabIndex].id;
if (this.viewId === newViewId) {
return;
}
this.viewId = newViewId;
this.viewItemsLoading = true;
try {
await this.loadItems();