From b23d11392e0f5e93058ad8adafccc0012fd67e18 Mon Sep 17 00:00:00 2001 From: Pranav C <61551451+pranavxc@users.noreply.github.com> Date: Tue, 27 Jul 2021 16:19:23 +0530 Subject: [PATCH] fix: lookup column rename issuea Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com> --- packages/nc-gui/components/dynamicStyle.js | 6 + .../project/spreadsheet/mixins/spreadsheet.js | 3 + .../project/spreadsheet/rowsXcDataTable.vue | 3 - .../project/spreadsheet/views/xcGridView.vue | 15 ++- .../src/lib/noco/common/BaseApiBuilder.ts | 116 ++++++++++-------- .../nocodb/src/lib/noco/gql/GqlApiBuilder.ts | 1 - 6 files changed, 83 insertions(+), 61 deletions(-) create mode 100644 packages/nc-gui/components/dynamicStyle.js diff --git a/packages/nc-gui/components/dynamicStyle.js b/packages/nc-gui/components/dynamicStyle.js new file mode 100644 index 0000000000..abb7c5ae80 --- /dev/null +++ b/packages/nc-gui/components/dynamicStyle.js @@ -0,0 +1,6 @@ +export default { + name: 'DynamicStyle', + render(createElement) { + return createElement('style', this.$slots.default) + } +} diff --git a/packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js b/packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js index 9a9c28f625..500cdb099c 100644 --- a/packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js +++ b/packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js @@ -253,6 +253,9 @@ export default { } }, watch: { + meta() { + this.mapFieldsAndShowFields() + }, 'viewStatus.type'() { if (!this.loadingMeta || !this.loadingData) { this.syncDataDebounce(this) diff --git a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue index 3aca1b3c19..5bc6f67365 100644 --- a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue +++ b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue @@ -941,9 +941,6 @@ export default { if (col) { this.$set(this.showFields, col, true) } - if (this.selectedViewId === tableMeta.id) { - this.columnsWidth = qp.columnsWidth || this.columnsWidth - } } catch (e) { } } diff --git a/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue b/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue index dea469ed2b..350ac67c99 100644 --- a/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue +++ b/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue @@ -208,11 +208,17 @@
-
+ + + +