Browse Source

refactor(gui-v2): reload child list on linking

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3025/head
Pranav C 2 years ago
parent
commit
c9da515c0d
  1. 2
      packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue
  2. 3
      packages/nc-gui-v2/composables/useLTARStore.ts

2
packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue

@ -42,7 +42,7 @@ await loadRelatedTableMeta()
@click="listItemsDlg = true"
/>
</div>
<ListItems v-model="listItemsDlg" @attach-record=" (listItemsDlg = true)"/>
<ListItems v-model="listItemsDlg" @attach-record="listItemsDlg = true" />
</div>
</template>

3
packages/nc-gui-v2/composables/useLTARStore.ts

@ -93,6 +93,8 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
const loadChildrenList = async () => {
try {
if (colOptions.type === 'bt') return
childrenList.value = await $api.dbTableRow.nestedList(
NOCO,
project.value.id as string,
@ -198,6 +200,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
column?.value?.title,
getRelatedTableRowId(row) as string,
)
await loadChildrenList()
} catch (e: any) {
notification.error({
message: 'Linking failed',

Loading…
Cancel
Save