feat: M2m

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
This commit is contained in:
Pranav C
2021-06-27 20:07:53 +05:30
parent 7b0a39bccc
commit 3af94bbb72
22 changed files with 572 additions and 696 deletions

View File

@@ -838,7 +838,7 @@ export default {
break;
}
},
async loadMeta() {
async loadMeta(updateShowFields = true) {
this.loadingMeta = true;
const tableMeta = await this.$store.dispatch('sqlMgr/ActSqlOp', [{
env: this.nodes.env,
@@ -848,6 +848,13 @@ export default {
}]);
this.meta = JSON.parse(tableMeta.meta);
this.loadingMeta = false;
if (updateShowFields) {
try {
const qp = JSON.parse(tableMeta.query_params)
this.showFields = qp.showFields ? qp.showFields : this.showFields;
} catch (e) {
}
}
},
loadTableDataDeb: debounce(async function (self) {
await self.loadTableDataFn()
@@ -889,10 +896,10 @@ export default {
this.selectedExpandRowMeta = rowMeta;
},
async onNewColCreation() {
await this.loadMeta();
await this.loadMeta(true);
this.$nextTick(async () => {
await this.loadTableData();
this.mapFieldsAndShowFields();
// this.mapFieldsAndShowFields();
});
}
},