console: fix data sidebar not updated when a table is renamed

https://github.com/hasura/graphql-engine-mono/pull/2237

GitOrigin-RevId: 53ee0ab1b786e8364df3af73396c97c6acb5470f
This commit is contained in:
Ikechukwu Eze 2021-08-30 11:49:37 +01:00 committed by hasura-bot
parent da7c53b8dd
commit 8ca110b5bb
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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,