diff --git a/packages/nc-gui/composables/useViewColumns.ts b/packages/nc-gui/composables/useViewColumns.ts index e471dec42a..4f783793c2 100644 --- a/packages/nc-gui/composables/useViewColumns.ts +++ b/packages/nc-gui/composables/useViewColumns.ts @@ -1,4 +1,4 @@ -import { ViewTypes, isCreatedOrLastModifiedByCol, isSystemColumn } from 'nocodb-sdk' +import { ViewTypes, isCreatedOrLastModifiedByCol, isMMSystemCol, isSystemColumn } from 'nocodb-sdk' import type { ColumnType, GridColumnReqType, GridColumnType, MapType, TableType, ViewType } from 'nocodb-sdk' import type { ComputedRef, Ref } from 'vue' import { computed, ref, storeToRefs, useBase, useNuxtApp, useRoles, useUndoRedo, watch } from '#imports' @@ -72,7 +72,7 @@ const [useProvideViewColumns, useViewColumns] = useInjectionState( fields.value = meta.value?.columns ?.filter((column: ColumnType) => { // filter created by and last modified by system columns - if (isCreatedOrLastModifiedByCol(column) && column.system) return false + if ((isCreatedOrLastModifiedByCol(column) || isMMSystemCol(column)) && column.system) return false return true }) .map((column: ColumnType) => { diff --git a/packages/nocodb-sdk/src/lib/UITypes.ts b/packages/nocodb-sdk/src/lib/UITypes.ts index 659a8e744d..1b4eb4911b 100644 --- a/packages/nocodb-sdk/src/lib/UITypes.ts +++ b/packages/nocodb-sdk/src/lib/UITypes.ts @@ -162,6 +162,14 @@ export function isCreatedOrLastModifiedByCol( ); } +export function isMMSystemCol( + col: (ColumnReqType | ColumnType) & { system?: number | boolean } +) { + return ( + col.system && [UITypes.LinkToAnotherRecord].includes(col.uidt) + ); +} + export function isLinksOrLTAR( colOrUidt: ColumnType | { uidt: UITypes | string } | UITypes | string ) { diff --git a/packages/nocodb-sdk/src/lib/index.ts b/packages/nocodb-sdk/src/lib/index.ts index 1e97bd049f..3b674c6791 100644 --- a/packages/nocodb-sdk/src/lib/index.ts +++ b/packages/nocodb-sdk/src/lib/index.ts @@ -16,6 +16,7 @@ export { isLinksOrLTAR, isCreatedOrLastModifiedTimeCol, isCreatedOrLastModifiedByCol, + isMMSystemCol } from '~/lib/UITypes'; export { default as CustomAPI, FileType } from '~/lib/CustomAPI'; export { default as TemplateGenerator } from '~/lib/TemplateGenerator';