Signed-off-by: Pranav C <pranavxc@gmail.com>
@ -1,6 +1,6 @@
<script setup lang="ts">
import type { LinkToAnotherRecordType, TableType } from 'nocodb-sdk'
import { UITypes, isLinksOrLTAR } from 'nocodb-sdk'
import { isLinksOrLTAR } from 'nocodb-sdk'
import type { ERDConfig } from './utils'
import { reactive, ref, storeToRefs, useMetas, useProject, watch } from '#imports'
@ -174,7 +174,7 @@ export function useErdElements(tables: MaybeRef<TableType[]>, props: MaybeRef<ER
const columns =
metasWithIdAsKey.value[table.id].columns?.filter(
(col) => config.showAllColumns || (!config.showAllColumns && col.uidt === UITypes.LinkToAnotherRecord),
(col) => config.showAllColumns || (!config.showAllColumns && isLinksOrLTAR(col)),
) || []
const pkAndFkColumns = columns.filter(() => config.showPkAndFk).filter((col) => col.pk || col.uidt === UITypes.ForeignKey)