mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-11 10:46:25 +03:00
Console: allow user to collapse table treeview node
This commit is contained in:
parent
8579570459
commit
2b172e66da
@ -106,15 +106,15 @@ const DataSubSidebar = props => {
|
||||
|
||||
const onSchemaChange = value => {
|
||||
if (value === currentSchema) {
|
||||
dispatch(_push(`/data/${currentDataSource}/schema/${value}`));
|
||||
return;
|
||||
// Clicking the same schema again should collapse the treeview node
|
||||
value = undefined;
|
||||
}
|
||||
|
||||
setSchemaLoading(true);
|
||||
dispatch(updateCurrentSchema(value, currentDataSource))
|
||||
.then(() => {
|
||||
if (value === currentSchema) {
|
||||
dispatch(_push(`/data/${currentDataSource}/schema/${value}`));
|
||||
if (!value) {
|
||||
dispatch(_push(`/data/${currentDataSource}`));
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user