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. 26
      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"

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

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

Loading…
Cancel
Save