Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(nc-gui): expanded form switch to comment tab if user clicks on comment count from grid row

Ramesh Mane7d8688d0e42e
diff --git a/packages/nc-gui/components/smartsheet/expanded-form/Sidebar/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/Sidebar/index.vue
index 691b8a12b5..a47c8dd49e 100644
--- a/packages/nc-gui/components/smartsheet/expanded-form/Sidebar/index.vue
+++ b/packages/nc-gui/components/smartsheet/expanded-form/Sidebar/index.vue
@@ -7,7 +7,11 @@ const { isSqlView } = useSmartsheetStoreOrThrow()
const expandedFormStore = useExpandedFormStoreOrThrow()
-const tab = ref<'fields' | 'comments' | 'audits'>(props.showFieldsTab ? 'fields' : 'comments')
+const { isExpandedFormCommentMode } = storeToRefs(useConfigStore())
+
+const tab = ref<'fields' | 'comments' | 'audits'>(
+ props.showFieldsTab && (!isExpandedFormCommentMode.value || isSqlView.value) ? 'fields' : 'comments',
+)
watch(tab, (newValue) => {
if (newValue === 'audits') {