From 60c7d7a42e5ecf51cf8d2b21795fad2aac021f35 Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Tue, 28 Mar 2023 16:57:04 +1100 Subject: [PATCH] fix: table editor showing empty cells after renaming column --- .../TableGridEditor/SidePanelEditor/SidePanelEditor.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx index 9b002df95d9..99ce84b03f4 100644 --- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx +++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx @@ -263,8 +263,13 @@ const SidePanelEditor = ({ if (response?.error) { ui.setNotification({ category: 'error', message: response.error.message }) } else { - await meta.tables.loadById(selectedTable!.id) queryClient.invalidateQueries(sqlKeys.query(project?.ref, ['foreign-key-constraints'])) + await Promise.all([ + meta.tables.loadById(selectedTable!.id), + queryClient.invalidateQueries( + sqlKeys.query(project?.ref, [selectedTable!.schema, selectedTable!.name]) + ), + ]) onColumnSaved(configuration.isEncrypted) setIsEdited(false) closePanel()