From 6cb664060e2db8817e79f537d04fdec36ced292a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 3 Jul 2023 10:13:42 +0100 Subject: [PATCH] Refetch tables on many to many --- .../backend/DataTable/modals/CreateEditColumn.svelte | 6 ++++++ .../DataTable/modals/grid/GridCreateColumnModal.svelte | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 8a4a6d3012..318b7d9663 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -182,6 +182,12 @@ indexes, }) dispatch("updatecolumns") + if ( + saveColumn.type === LINK_TYPE && + saveColumn.relationshipType === RelationshipTypes.MANY_TO_MANY + ) { + dispatch("updatetables") + } if (originalName) { notifications.success("Column updated successfully") } else { diff --git a/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateColumnModal.svelte b/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateColumnModal.svelte index 9e386ae140..d0d3b81d84 100644 --- a/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateColumnModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/grid/GridCreateColumnModal.svelte @@ -1,6 +1,7 @@ - + { + tables.fetch() + }} + />