Browse Source

fix(nc-gui): lazy load breaks item chip

pull/3801/head
braks 2 years ago
parent
commit
71ccf80beb
  1. 6
      packages/nc-gui/components/virtual-cell/BelongsTo.vue
  2. 2
      packages/nc-gui/components/virtual-cell/HasMany.vue
  3. 2
      packages/nc-gui/components/virtual-cell/ManyToMany.vue
  4. 2
      packages/nc-gui/components/virtual-cell/components/ItemChip.vue

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

@ -76,11 +76,7 @@ const unlinkRef = async (rec: Record<string, any>) => {
<div class="flex w-full chips-wrapper items-center" :class="{ active }">
<div class="chips flex items-center flex-1">
<template v-if="value && relatedTablePrimaryValueProp">
<LazyVirtualCellComponentsItemChip
:item="value"
:value="value[relatedTablePrimaryValueProp]"
@unlink="unlinkRef(value)"
/>
<VirtualCellComponentsItemChip :item="value" :value="value[relatedTablePrimaryValueProp]" @unlink="unlinkRef(value)" />
</template>
</div>

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

@ -88,7 +88,7 @@ const onAttachRecord = () => {
<template v-if="!isForm">
<div class="chips flex items-center img-container flex-1 hm-items flex-nowrap min-w-0 overflow-hidden">
<template v-if="cells">
<LazyVirtualCellComponentsItemChip
<VirtualCellComponentsItemChip
v-for="(cell, i) of cells"
:key="i"
:item="cell.item"

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

@ -89,7 +89,7 @@ const onAttachRecord = () => {
<template v-if="!isForm">
<div class="chips flex items-center img-container flex-1 hm-items flex-nowrap min-w-0 overflow-hidden">
<template v-if="cells">
<LazyVirtualCellComponentsItemChip
<VirtualCellComponentsItemChip
v-for="(cell, i) of cells"
:key="i"
:item="cell.item"

2
packages/nc-gui/components/virtual-cell/components/ItemChip.vue

@ -44,7 +44,7 @@ export default {
</div>
<Suspense>
<LazySmartsheetExpandedForm
<SmartsheetExpandedForm
v-if="!readOnly && !isLocked && expandedFormDlg"
v-model="expandedFormDlg"
:row="{ row: item, rowMeta: {}, oldRow: { ...item } }"

Loading…
Cancel
Save