fix: avoid duplicate table create invoke on tab switch

closes #804

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2021-11-24 11:27:35 +05:30
parent 0430e81fd5
commit cbca1d7397

View File

@@ -816,7 +816,7 @@ export default {
this.featureType = feat
},
async createTableIfNewTable() {
if (this.nodes.newTable) {
if (this.nodes.newTable && !this.nodes.tableCreated) {
const columns = this.sqlUi.getNewTableColumns().filter(col => this.nodes.newTable.columns.includes(col.cn))
await this.$store.dispatch('sqlMgr/ActSqlOpPlus', [
{
@@ -834,7 +834,8 @@ export default {
...this.nodes
}
})
// delete this.nodes.newTable
// eslint-disable-next-line vue/no-mutating-props
this.nodes.tableCreated = true
}
this.loadViews = true