Browse Source

fix: LTAR broken

pull/6360/head
DarkPhoenix2704 1 year ago
parent
commit
6a93fb0398
  1. 62
      packages/nc-gui/components/virtual-cell/HasMany.vue
  2. 62
      packages/nc-gui/components/virtual-cell/ManyToMany.vue

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

@ -103,40 +103,38 @@ useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e: KeyboardEven
<template> <template>
<div class="flex items-center gap-1 w-full chips-wrapper"> <div class="flex items-center gap-1 w-full chips-wrapper">
<template v-if="!isForm"> <div class="chips flex items-center img-container flex-1 hm-items flex-nowrap min-w-0 overflow-hidden">
<div class="chips flex items-center img-container flex-1 hm-items flex-nowrap min-w-0 overflow-hidden"> <template v-if="cells">
<template v-if="cells"> <VirtualCellComponentsItemChip
<VirtualCellComponentsItemChip v-for="(cell, i) of cells"
v-for="(cell, i) of cells" :key="i"
:key="i" :item="cell.item"
:item="cell.item" :value="cell.value"
:value="cell.value" :column="hasManyColumn"
:column="hasManyColumn" :show-unlink-button="true"
:show-unlink-button="true" @unlink="unlinkRef(cell.item)"
@unlink="unlinkRef(cell.item)"
/>
<span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">
more...
</span>
</template>
</div>
<div v-if="!isLocked && !isUnderLookup" class="flex justify-end gap-1 min-h-[30px] items-center">
<GeneralIcon
icon="expand"
class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand"
@click.stop="childListDlg = true"
/> />
<GeneralIcon <span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">
v-if="!readOnly && isUIAllowed('xcDatatableEditable')" more...
icon="plus" </span>
class="select-none text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-plus" </template>
@click.stop="listItemsDlg = true" </div>
/>
</div> <div v-if="!isLocked && !isUnderLookup" class="flex justify-end gap-1 min-h-[30px] items-center">
</template> <GeneralIcon
icon="expand"
class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand"
@click.stop="childListDlg = true"
/>
<GeneralIcon
v-if="!readOnly && isUIAllowed('xcDatatableEditable')"
icon="plus"
class="select-none text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-plus"
@click.stop="listItemsDlg = true"
/>
</div>
<LazyVirtualCellComponentsListItems v-model="listItemsDlg" :column="hasManyColumn" /> <LazyVirtualCellComponentsListItems v-model="listItemsDlg" :column="hasManyColumn" />

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

@ -105,40 +105,38 @@ const m2mColumn = computed(
<template> <template>
<div class="flex items-center gap-1 w-full chips-wrapper"> <div class="flex items-center gap-1 w-full chips-wrapper">
<template v-if="!isForm"> <div class="chips flex items-center img-container flex-1 hm-items flex-nowrap min-w-0 overflow-hidden">
<div class="chips flex items-center img-container flex-1 hm-items flex-nowrap min-w-0 overflow-hidden"> <template v-if="cells">
<template v-if="cells"> <VirtualCellComponentsItemChip
<VirtualCellComponentsItemChip v-for="(cell, i) of cells"
v-for="(cell, i) of cells" :key="i"
:key="i" :item="cell.item"
:item="cell.item" :value="cell.value"
:value="cell.value" :column="m2mColumn"
:column="m2mColumn" :show-unlink-button="true"
:show-unlink-button="true" @unlink="unlinkRef(cell.item)"
@unlink="unlinkRef(cell.item)"
/>
<span v-if="cells?.length === 10" class="caption pointer ml-1 grey--text" @click.stop="childListDlg = true">
more...
</span>
</template>
</div>
<div v-if="!isLocked && !isUnderLookup" class="flex justify-end gap-1 min-h-[30px] items-center">
<GeneralIcon
icon="expand"
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand"
@click.stop="childListDlg = true"
/> />
<GeneralIcon <span v-if="cells?.length === 10" class="caption pointer ml-1 grey--text" @click.stop="childListDlg = true">
v-if="!readOnly && isUIAllowed('xcDatatableEditable')" more...
icon="plus" </span>
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-plus" </template>
@click.stop="listItemsDlg = true" </div>
/>
</div> <div v-if="!isLocked && !isUnderLookup" class="flex justify-end gap-1 min-h-[30px] items-center">
</template> <GeneralIcon
icon="expand"
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand"
@click.stop="childListDlg = true"
/>
<GeneralIcon
v-if="!readOnly && isUIAllowed('xcDatatableEditable')"
icon="plus"
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-plus"
@click.stop="listItemsDlg = true"
/>
</div>
<LazyVirtualCellComponentsListItems v-model="listItemsDlg" :column="m2mColumn" /> <LazyVirtualCellComponentsListItems v-model="listItemsDlg" :column="m2mColumn" />

Loading…
Cancel
Save