From 8ca110b5bb2af799eda9649b7ed093c0b3bd2362 Mon Sep 17 00:00:00 2001 From: Ikechukwu Eze Date: Mon, 30 Aug 2021 11:49:37 +0100 Subject: [PATCH] console: fix data sidebar not updated when a table is renamed https://github.com/hasura/graphql-engine-mono/pull/2237 GitOrigin-RevId: 53ee0ab1b786e8364df3af73396c97c6acb5470f --- CHANGELOG.md | 1 + console/src/components/Services/Data/DataSubSidebar.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d38a7ee7b5f..562d64ac839 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - console: fix error due to rendering inconsistent object's message - console: support insecure TLS allowlist - console: support computed fields in remote schema join +- console: fix data sidebar not updated when a table is renamed - cli: fix delay starting console using `hasura console` (#7255 ## v2.0.7 diff --git a/console/src/components/Services/Data/DataSubSidebar.js b/console/src/components/Services/Data/DataSubSidebar.js index 69666635dab..06becd25b4d 100644 --- a/console/src/components/Services/Data/DataSubSidebar.js +++ b/console/src/components/Services/Data/DataSubSidebar.js @@ -72,6 +72,7 @@ const DataSubSidebar = props => { pathname, dataSources, sidebarLoadingState, + currentTable, } = props; const { setDriver } = useDataSource(); @@ -233,7 +234,7 @@ const DataSubSidebar = props => { setTreeViewItems(newItems); } ); - }, [sources.length, tables, functions, enums, schemaList]); + }, [sources.length, tables, functions, enums, schemaList, currentTable]); const loadStyle = { pointerEvents: 'none', @@ -325,6 +326,7 @@ const mapStateToProps = state => { .flat().length, currentDataSource: state.tables.currentDataSource, currentSchema: state.tables.currentSchema, + currentTable: state.tables.currentTable, schemaList: state.tables.schemaList, allSourcesSchemas: state.tables?.allSourcesSchemas, pathname: state?.routing?.locationBeforeTransitions?.pathname,