diff --git a/packages/nc-gui/components/smartsheet/expanded-form/Header.vue b/packages/nc-gui/components/smartsheet/expanded-form/Header.vue
index 991daa19e2..0de4f5c584 100644
--- a/packages/nc-gui/components/smartsheet/expanded-form/Header.vue
+++ b/packages/nc-gui/components/smartsheet/expanded-form/Header.vue
@@ -20,7 +20,7 @@ const route = useRoute()
const { meta, isSqlView } = useSmartsheetStoreOrThrow()
-const { commentsDrawer, displayValue, primaryKey, save: _save, loadRow } = useExpandedFormStoreOrThrow()
+const { commentsDrawer, displayValue, primaryKey, save: _save, loadRow, deleteRowById } = useExpandedFormStoreOrThrow()
const { isNew, syncLTARRefs, state } = useSmartsheetRowStoreOrThrow()
@@ -72,8 +72,6 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
const showDeleteRowModal = ref(false)
-const { deleteRowById } = useViewData(meta, ref(props.view))
-
const onDeleteRowClick = () => {
showDeleteRowModal.value = true
}
@@ -81,7 +79,7 @@ const onDeleteRowClick = () => {
const onConfirmDeleteRowClick = async () => {
showDeleteRowModal.value = false
await deleteRowById(primaryKey.value)
- reloadTrigger.trigger()
+ await reloadTrigger.trigger()
emit('cancel')
message.success('Row deleted')
}
diff --git a/packages/nc-gui/components/smartsheet/expanded-form/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/index.vue
index b86be388b2..d6c6772390 100644
--- a/packages/nc-gui/components/smartsheet/expanded-form/index.vue
+++ b/packages/nc-gui/components/smartsheet/expanded-form/index.vue
@@ -114,8 +114,6 @@ if (props.rowId) {
useProvideSmartsheetStore(ref({}) as Ref
, meta)
-provide(IsFormInj, ref(true))
-
watch(
state,
() => {
diff --git a/packages/nc-gui/components/smartsheet/header/Cell.vue b/packages/nc-gui/components/smartsheet/header/Cell.vue
index 4ba762705d..1cde0549a5 100644
--- a/packages/nc-gui/components/smartsheet/header/Cell.vue
+++ b/packages/nc-gui/components/smartsheet/header/Cell.vue
@@ -1,11 +1,12 @@
@@ -50,10 +58,10 @@ const openHeaderMenu = () => {
class="flex items-center w-full text-xs text-gray-500 font-weight-medium"
:class="{ 'h-full': column, '!text-gray-400': isKanban }"
@dblclick="openHeaderMenu"
- @click.right="isDropDownOpen = !isDropDownOpen"
+ @click.right="openDropDown"
@click="isDropDownOpen = false"
>
-
+
{
{
diff --git a/packages/nc-gui/components/smartsheet/header/VirtualCell.vue b/packages/nc-gui/components/smartsheet/header/VirtualCell.vue
index fad5af03b7..b7adbb55ff 100644
--- a/packages/nc-gui/components/smartsheet/header/VirtualCell.vue
+++ b/packages/nc-gui/components/smartsheet/header/VirtualCell.vue
@@ -22,7 +22,7 @@ import {
useUIPermission,
} from '#imports'
-const props = defineProps<{ column: ColumnType; hideMenu?: boolean; required?: boolean | number }>()
+const props = defineProps<{ column: ColumnType; hideMenu?: boolean; required?: boolean | number; hideIcon?: boolean }>()
const { t } = useI18n()
@@ -44,6 +44,8 @@ const meta = inject(MetaInj, ref())
const isForm = inject(IsFormInj, ref(false))
+const isExpandedForm = inject(IsExpandedFormOpenInj, ref(false))
+
const colOptions = computed(() => column.value?.colOptions)
const tableTile = computed(() => meta?.value?.title)
@@ -126,13 +128,17 @@ const closeAddColumnDropdown = () => {
:class="{ 'h-full': column }"
@click.right="isDropDownOpen = !isDropDownOpen"
>
-
+
{{ tooltipMsg }}
-
+
{{ column.title }}
@@ -143,7 +149,7 @@ const closeAddColumnDropdown = () => {
-
-
-
-
-
-
- more...
-
-
-
-
-
-
+
+
-
-
-
+
+ more...
+
+
+
+
+
+
+
+
+
diff --git a/packages/nc-gui/components/virtual-cell/Links.vue b/packages/nc-gui/components/virtual-cell/Links.vue
index bab57aa002..0d10f54196 100644
--- a/packages/nc-gui/components/virtual-cell/Links.vue
+++ b/packages/nc-gui/components/virtual-cell/Links.vue
@@ -21,6 +21,8 @@ const isLocked = inject(IsLockedInj, ref(false))
const isUnderLookup = inject(IsUnderLookupInj, ref(false))
+const colTitle = computed(() => column.value?.title || '')
+
const listItemsDlg = ref(false)
const childListDlg = ref(false)
@@ -43,10 +45,16 @@ const relatedTableDisplayColumn = computed(
loadRelatedTableMeta()
const textVal = computed(() => {
+ if (isForm?.value) {
+ return state.value?.[colTitle.value]?.length
+ ? `${+state.value?.[colTitle.value]?.length} records Linked`
+ : 'No records linked'
+ }
+
const parsedValue = +value?.value || 0
if (!parsedValue) {
- return 'Empty'
+ return 'No records linked'
} else if (parsedValue === 1) {
return `1 ${column.value?.meta?.singular || 'Link'}`
} else {
@@ -84,30 +92,27 @@ const localCellValue = computed(() => {
-
-
-
-
- {{ textVal }}
-
-
-
-
-
-
-
-
+
+
+
+ {{ textVal }}
+
+
+
+
+
+
+
diff --git a/packages/nc-gui/components/virtual-cell/ManyToMany.vue b/packages/nc-gui/components/virtual-cell/ManyToMany.vue
index bca77bd481..cb3e46c14b 100644
--- a/packages/nc-gui/components/virtual-cell/ManyToMany.vue
+++ b/packages/nc-gui/components/virtual-cell/ManyToMany.vue
@@ -105,40 +105,38 @@ const m2mColumn = computed(
-
-
-
-
-
-
- more...
-
-
-
-
-
-
+
+
-
-
-
+
+ more...
+
+
+
+
+
+
+
+
+
diff --git a/packages/nc-gui/components/virtual-cell/components/Header.vue b/packages/nc-gui/components/virtual-cell/components/Header.vue
new file mode 100644
index 0000000000..da78143a2c
--- /dev/null
+++ b/packages/nc-gui/components/virtual-cell/components/Header.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+ {{ showHeader ? 'Linked Records' : '' }}
+
+
+
+
+
+ {{ displayValue }}
+
+
+
+ {{ relationMeta.title }}
+
+
+
+
+
+ {{ relatedTableTitle }} Records
+
+
+
+
+
+
+
{{ relationMeta.title }}
+
+ {{ relationMeta.tooltip_desc }}
+
+ {{ tableTitle }}
+
+ {{ relationMeta.tooltip_desc2 }}
+
+ {{ relatedTableTitle }}
+
+
+
+
+
+
+
+
diff --git a/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue b/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue
index cdfe071ea9..4a6a2052ed 100644
--- a/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue
+++ b/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue
@@ -1,16 +1,16 @@
-
-