Browse Source

fix(nc-gui): Hide MM system column in ERD view

pull/6565/head
Muhammed Mustafa 1 year ago
parent
commit
18ed49ab4f
  1. 20
      packages/nc-gui/components/erd/TableNode.vue

20
packages/nc-gui/components/erd/TableNode.vue

@ -29,12 +29,28 @@ const relatedColumnId = (colOptions: LinkToAnotherRecordType | any) =>
const hasColumns = computed(() => data.pkAndFkColumns.length || data.nonPkColumns.length)
const nonPkColumns = computed(() =>
data.nonPkColumns
// Removed MM system column from the table node
.filter((col) => !(col.system && isLinksOrLTAR(col))),
)
watch(
() => viewport.value.zoom,
() => {
isZooming.value = true
},
)
watch(
() => data,
() => {
console.log('data changed', data)
},
{
immediate: true,
},
)
</script>
<template>
@ -80,10 +96,10 @@ watch(
<LazySmartsheetHeaderCell v-if="col" class="nc-erd-table-node-column" :column="col" :hide-menu="true" />
</div>
<div v-for="(col, index) in data.nonPkColumns" :key="col.title">
<div v-for="(col, index) in nonPkColumns" :key="col.title">
<div
class="relative w-full h-full flex items-center min-w-32 py-2 px-1"
:class="index + 1 === data.nonPkColumns.length ? 'rounded-b-lg' : ''"
:class="index + 1 === nonPkColumns.length ? 'rounded-b-lg' : ''"
>
<div
v-if="isLinksOrLTAR(col)"

Loading…
Cancel
Save