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" @click="listItemsDlg = true"
/> />
</div> </div>
<ListItems v-model="listItemsDlg" @attach-record=" (listItemsDlg = true)"/> <ListItems v-model="listItemsDlg" @attach-record="listItemsDlg = true" />
</div> </div>
</template> </template>

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

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

Loading…
Cancel
Save