Browse Source

fix(gui): reload LTAR list on value change

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3569/head
Pranav C 2 years ago committed by Raju Udava
parent
commit
796b535855
  1. 1
      packages/nc-gui/components/virtual-cell/HasMany.vue
  2. 1
      packages/nc-gui/components/virtual-cell/ManyToMany.vue
  3. 11
      packages/nc-gui/components/virtual-cell/components/ListChildItems.vue

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

@ -112,6 +112,7 @@ const unlinkRef = async (rec: Record<string, any>) => {
<ListChildItems <ListChildItems
v-model="childListDlg" v-model="childListDlg"
:cell-value="localCellValue"
@attach-record=" @attach-record="
() => { () => {
childListDlg = false childListDlg = false

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

@ -112,6 +112,7 @@ const unlinkRef = async (rec: Record<string, any>) => {
<ListChildItems <ListChildItems
v-model="childListDlg" v-model="childListDlg"
:cell-value="localCellValue"
@attach-record=" @attach-record="
() => { () => {
childListDlg = false childListDlg = false

11
packages/nc-gui/components/virtual-cell/components/ListChildItems.vue

@ -13,7 +13,7 @@ import {
} from '#imports' } from '#imports'
import { IsPublicInj } from '~/context' import { IsPublicInj } from '~/context'
const props = defineProps<{ modelValue?: boolean }>() const props = defineProps<{ modelValue?: boolean; cellValue: any }>()
const emit = defineEmits(['update:modelValue', 'attachRecord']) const emit = defineEmits(['update:modelValue', 'attachRecord'])
@ -70,13 +70,18 @@ const unlinkIfNewRow = async (row: Record<string, any>) => {
const container = computed(() => const container = computed(() =>
isForm?.value isForm?.value
? h('div', { ? h('div', {
class: 'w-full p-2', class: 'w-full p-2',
}) })
: Modal, : Modal,
) )
const expandedFormDlg = ref(false) const expandedFormDlg = ref(false)
const expandedFormRow = ref() const expandedFormRow = ref()
watch(() => props.cellValue, () => {
if (!isNew.value)
loadChildrenList()
})
</script> </script>
<template> <template>

Loading…
Cancel
Save