Browse Source

fix: links

pull/6573/head
mertmit 1 year ago
parent
commit
40588a607e
  1. 4
      packages/nc-gui/components/virtual-cell/HasMany.vue
  2. 8
      packages/nc-gui/components/virtual-cell/Links.vue
  3. 4
      packages/nc-gui/components/virtual-cell/ManyToMany.vue
  4. 10
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

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

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

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

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

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

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

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

@ -83,7 +83,9 @@ const unlinkRow = async (row: Record<string, any>, id: number) => {
}
/** reload list on modal open */
watch(vModel, (nextVal, prevVal) => {
watch(
vModel,
(nextVal, prevVal) => {
if (nextVal && !prevVal) {
/** reset query and limit */
childrenExcludedListPagination.query = ''
@ -93,7 +95,11 @@ watch(vModel, (nextVal, prevVal) => {
}
loadChildrenExcludedList(rowState.value)
}
})
},
{
immediate: true,
},
)
const expandedFormDlg = ref(false)

Loading…
Cancel
Save