diff --git a/packages/nc-gui/components/project/spreadsheet/components/sharedViewsList.vue b/packages/nc-gui/components/project/spreadsheet/components/sharedViewsList.vue
index 80d12cf2ae..856ddc9e2d 100644
--- a/packages/nc-gui/components/project/spreadsheet/components/sharedViewsList.vue
+++ b/packages/nc-gui/components/project/spreadsheet/components/sharedViewsList.vue
@@ -109,7 +109,7 @@ import viewIcons from '~/helpers/viewIcons'
export default {
name: 'SharedViewsList',
- props: ['modelName', 'nodes'],
+ props: ['modelName', 'nodes', 'selectedView'],
data: () => ({
viewsList: null,
currentView: null,
@@ -136,7 +136,15 @@ export default {
model_name: this.modelName
}])
- const index = viewsList.findIndex(v => (v.view_name || '').toLowerCase() === (this.$route.query.view || '').toLowerCase())
+ const index = viewsList.findIndex((v) => {
+ if (this.selectedView) {
+ // if current view is main view compare with model name
+ return (['table', 'view'].includes(this.selectedView.type) ? this.modelName : this.selectedView.title) === v.view_name
+ } else {
+ return (v.view_name || '').toLowerCase() === (this.$route.query.view || '').toLowerCase()
+ }
+ })
+
if (index > -1) {
this.currentView = viewsList.splice(index, 1)[0]
} else {
@@ -164,7 +172,8 @@ export default {
th, td {
padding: 0 5px;
}
-/deep/ .nc-switch-show-all .v-input--selection-controls__input {
+
+/deep/ .nc-switch-show-all .v-input--selection-controls__input {
transform: scale(0.5) !important;
}
diff --git a/packages/nc-gui/components/project/spreadsheet/overlay/additinalFeatures.vue b/packages/nc-gui/components/project/spreadsheet/overlay/additinalFeatures.vue
index 984d51c4f8..e304ab5e30 100644
--- a/packages/nc-gui/components/project/spreadsheet/overlay/additinalFeatures.vue
+++ b/packages/nc-gui/components/project/spreadsheet/overlay/additinalFeatures.vue
@@ -57,6 +57,7 @@
@@ -81,7 +82,7 @@ import SharedViewsList from '@/components/project/spreadsheet/components/sharedV
export default {
name: 'AdditionalFeatures',
components: { SharedViewsList, ViewColumns, Validation, Webhooks, Triggers, Indexes, Columns, TableAcl },
- props: ['value', 'nodes', 'type', 'deleteTable', 'table'],
+ props: ['value', 'nodes', 'type', 'deleteTable', 'table', 'selectedView'],
computed: {
show: {
set(v) {
diff --git a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue
index 87abd331af..da2c0fcb4f 100644
--- a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue
+++ b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue
@@ -514,6 +514,7 @@