Browse Source

fix: hide CreatedBy & LastModifiedBy system fields from ERD

pull/7373/head
mertmit 10 months ago
parent
commit
a5f1213ba4
  1. 7
      packages/nc-gui/components/erd/utils.ts

7
packages/nc-gui/components/erd/utils.ts

@ -175,9 +175,10 @@ export function useErdElements(tables: MaybeRef<TableType[]>, props: MaybeRef<ER
if (!table.id) return acc
const columns =
metasWithIdAsKey.value[table.id].columns?.filter(
(col) => config.value.showAllColumns || (!config.value.showAllColumns && isLinksOrLTAR(col)),
) || []
metasWithIdAsKey.value[table.id].columns?.filter((col) => {
if ([UITypes.CreatedBy, UITypes.LastModifiedBy].includes(col.uidt as UITypes) && col.system) return false
return config.value.showAllColumns || (!config.value.showAllColumns && isLinksOrLTAR(col))
}) || []
const pkAndFkColumns = columns
.filter(() => config.value.showPkAndFk)

Loading…
Cancel
Save