From 15bec7aae858f66447b28b1024f4fa54dad3855f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 2 Oct 2023 14:51:48 +0200 Subject: [PATCH] Refresh relationships on column link add/edit/delete --- .../backend/DataTable/modals/CreateEditColumn.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 1c64dfe5ec..c67ce67d57 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -277,10 +277,7 @@ dispatch("updatecolumns") gridDispatch("close-edit-column") - if ( - saveColumn.type === LINK_TYPE && - saveColumn.relationshipType === RelationshipType.MANY_TO_MANY - ) { + if (saveColumn.type === LINK_TYPE) { // Fetching the new tables tables.fetch() // Fetching the new relationships @@ -312,6 +309,11 @@ confirmDeleteDialog.hide() dispatch("updatecolumns") gridDispatch("close-edit-column") + + if (editableColumn.type === LINK_TYPE) { + // Updating the relationships + datasources.fetch() + } } } catch (error) { notifications.error(`Error deleting column: ${error.message}`)