Browse Source

fix: only render cell modals on demand

pull/6573/head
mertmit 1 year ago
parent
commit
693c389e2f
  1. 7
      packages/nc-gui/components/virtual-cell/BelongsTo.vue
  2. 3
      packages/nc-gui/components/virtual-cell/HasMany.vue
  3. 3
      packages/nc-gui/components/virtual-cell/Links.vue
  4. 3
      packages/nc-gui/components/virtual-cell/ManyToMany.vue

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

@ -113,7 +113,12 @@ const belongsToColumn = computed(
/>
</div>
<LazyVirtualCellComponentsListItems v-model="listItemsDlg" :column="belongsToColumn" @attach-record="listItemsDlg = true" />
<LazyVirtualCellComponentsListItems
v-if="listItemsDlg"
v-model="listItemsDlg"
:column="belongsToColumn"
@attach-record="listItemsDlg = true"
/>
</div>
</template>

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

@ -136,9 +136,10 @@ useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e: KeyboardEven
/>
</div>
<LazyVirtualCellComponentsListItems v-model="listItemsDlg" :column="hasManyColumn" />
<LazyVirtualCellComponentsListItems v-if="listItemsDlg" v-model="listItemsDlg" :column="hasManyColumn" />
<LazyVirtualCellComponentsListChildItems
v-if="childListDlg"
v-model="childListDlg"
:cell-value="localCellValue"
:column="hasManyColumn"

3
packages/nc-gui/components/virtual-cell/Links.vue

@ -117,9 +117,10 @@ const localCellValue = computed<any[]>(() => {
/>
</div>
<LazyVirtualCellComponentsListItems v-model="listItemsDlg" :column="relatedTableDisplayColumn" />
<LazyVirtualCellComponentsListItems v-if="listItemsDlg" v-model="listItemsDlg" :column="relatedTableDisplayColumn" />
<LazyVirtualCellComponentsListChildItems
v-if="childListDlg"
v-model="childListDlg"
:column="relatedTableDisplayColumn"
:cell-value="localCellValue"

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

@ -138,9 +138,10 @@ const m2mColumn = computed(
/>
</div>
<LazyVirtualCellComponentsListItems v-model="listItemsDlg" :column="m2mColumn" />
<LazyVirtualCellComponentsListItems v-if="listItemsDlg" v-model="listItemsDlg" :column="m2mColumn" />
<LazyVirtualCellComponentsListChildItems
v-if="childListDlg"
v-model="childListDlg"
:cell-value="localCellValue"
:column="m2mColumn"

Loading…
Cancel
Save