mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 01:36:51 +00:00
refactor: optimize tab reload on tab switch
re #767 Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
@@ -583,6 +583,7 @@ export default {
|
||||
},
|
||||
mixins: [spreadsheet],
|
||||
props: {
|
||||
isActive: Boolean,
|
||||
tabId: String,
|
||||
env: String,
|
||||
nodes: Object,
|
||||
@@ -670,6 +671,11 @@ export default {
|
||||
rowContextMenu: null
|
||||
}),
|
||||
watch: {
|
||||
isActive(n, o) {
|
||||
if (!o && n) {
|
||||
this.reload()
|
||||
}
|
||||
},
|
||||
page(p) {
|
||||
this.$store.commit('tabs/MutSetTabState', {
|
||||
id: this.uniqueId,
|
||||
@@ -1159,7 +1165,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tabsState() { return this.$store.state.tabs.tabsState || {} },
|
||||
tabsState() {
|
||||
return this.$store.state.tabs.tabsState || {}
|
||||
},
|
||||
uniqueId() {
|
||||
return `${this.tabId}_${this.selectedViewId}`
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user