From e52a4420ab3cf6269bee7006f450b2028a2ded0c Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 12 Apr 2022 14:49:30 +0530 Subject: [PATCH] refactor: code cleanup Signed-off-by: Pranav C --- .../project/spreadsheet/public/xcKanban.vue | 1 - .../project/spreadsheet/public/xcTable.vue | 1 - .../project/spreadsheet/rowsXcDataTable.vue | 36 ------------------- .../project/spreadsheet/views/formView.vue | 5 +-- .../project/spreadsheet/views/xcGridView.vue | 3 -- packages/nc-gui/components/project/table.vue | 1 - 6 files changed, 3 insertions(+), 44 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/public/xcKanban.vue b/packages/nc-gui/components/project/spreadsheet/public/xcKanban.vue index dc61ca282c..dad14f9ab0 100644 --- a/packages/nc-gui/components/project/spreadsheet/public/xcKanban.vue +++ b/packages/nc-gui/components/project/spreadsheet/public/xcKanban.vue @@ -74,7 +74,6 @@ export default { props: { env: String, nodes: Object, - addNewRelationTab: Function, relationType: String, relation: Object, relationIdValue: [String, Number], diff --git a/packages/nc-gui/components/project/spreadsheet/public/xcTable.vue b/packages/nc-gui/components/project/spreadsheet/public/xcTable.vue index 5cdfd08bac..b7a5020302 100644 --- a/packages/nc-gui/components/project/spreadsheet/public/xcTable.vue +++ b/packages/nc-gui/components/project/spreadsheet/public/xcTable.vue @@ -147,7 +147,6 @@ export default { props: { env: String, nodes: Object, - addNewRelationTab: Function, relationType: String, relation: Object, relationIdValue: [String, Number], diff --git a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue index 5a975d49c6..aedf97c155 100644 --- a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue +++ b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue @@ -357,7 +357,6 @@ @onCellValueChange="onCellValueChange" @insertNewRow="insertNewRow" @showRowContextMenu="showRowContextMenu" - @addNewRelationTab="addNewRelationTab" @expandRow="expandRow" @onRelationDelete="loadMeta" @loadTableData="loadTableData" @@ -602,24 +601,6 @@ Set column value to null - - c.title)) }, async updateColMeta(col, i) { + // todo: introduce debounce to avoid consecutive api call if (col.id) { await this.$api.dbView.formColumnUpdate(col.id, col) } diff --git a/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue b/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue index 7ab5c85a12..7ad448d35a 100644 --- a/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue +++ b/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue @@ -659,9 +659,6 @@ export default { this.selected.row-- } }, - addNewRelationTab(...args) { - this.$emit('addNewRelationTab', ...args) - }, makeSelected(col, row) { if (this.selected.col !== col || this.selected.row !== row) { this.selected = { diff --git a/packages/nc-gui/components/project/table.vue b/packages/nc-gui/components/project/table.vue index f3336fd2aa..f6a9c863b7 100644 --- a/packages/nc-gui/components/project/table.vue +++ b/packages/nc-gui/components/project/table.vue @@ -35,7 +35,6 @@ :mtd-new-table-update="mtdNewTableUpdate" :delete-table="deleteTable" :is-meta-table="isMetaTable" - :add-new-relation-tab="addNewRelationTab" />