Browse Source

feat(nc-gui): pass showUnlinkButton

pull/5724/head
Wing-Kam Wong 1 year ago
parent
commit
4b173c0064
  1. 1
      packages/nc-gui/components/virtual-cell/BelongsTo.vue
  2. 1
      packages/nc-gui/components/virtual-cell/HasMany.vue
  3. 1
      packages/nc-gui/components/virtual-cell/ManyToMany.vue
  4. 6
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

1
packages/nc-gui/components/virtual-cell/BelongsTo.vue

@ -93,6 +93,7 @@ const belongsToColumn = computed(
:item="value"
:value="value[relatedTableDisplayValueProp]"
:column="belongsToColumn"
:show-unlink-button="true"
@unlink="unlinkRef(value)"
/>
</template>

1
packages/nc-gui/components/virtual-cell/HasMany.vue

@ -109,6 +109,7 @@ useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e: KeyboardEven
:item="cell.item"
:value="cell.value"
:column="hasManyColumn"
:show-unlink-button="true"
@unlink="unlinkRef(cell.item)"
/>

1
packages/nc-gui/components/virtual-cell/ManyToMany.vue

@ -111,6 +111,7 @@ const m2mColumn = computed(
:item="cell.item"
:value="cell.value"
:column="m2mColumn"
:show-unlink-button="true"
@unlink="unlinkRef(cell.item)"
/>

6
packages/nc-gui/components/virtual-cell/components/ListItems.vue

@ -229,7 +229,11 @@ watch(vModel, (nextVal) => {
:class="{ 'nc-selected-row': selectedRowIndex === i }"
@click="linkRow(refRow)"
>
<VirtualCellComponentsItemChip :value="refRow[relatedTableDisplayValueProp]" :column="props.column" />
<VirtualCellComponentsItemChip
:value="refRow[relatedTableDisplayValueProp]"
:column="props.column"
:show-unlink-button="false"
/>
<span class="hidden group-hover:(inline) text-gray-400 text-[11px] ml-1">
({{ $t('labels.primaryKey') }} : {{ getRelatedTableRowId(refRow) }})
</span>

Loading…
Cancel
Save