Skip to content

Commit 2af9d9e

Browse files
fix(SchemaTree): expand nodes if ChildrenExist is undefined (#1872)
1 parent c11e616 commit 2af9d9e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {selectUserInput} from '../../../../store/reducers/query/query';
1010
import {schemaApi} from '../../../../store/reducers/schema/schema';
1111
import {tableSchemaDataApi} from '../../../../store/reducers/tableSchemaData';
1212
import type {EPathType, TEvDescribeSchemeResult} from '../../../../types/api/schema';
13+
import {valueIsDefined} from '../../../../utils';
1314
import {
1415
useQueryExecutionSettings,
1516
useTypedDispatch,
@@ -78,12 +79,16 @@ export function SchemaTree(props: SchemaTreeProps) {
7879
const childItems = Children.map((childData) => {
7980
const {Name = '', PathType, PathSubType, ChildrenExist} = childData;
8081

82+
const isChildless =
83+
isChildlessPathType(PathType, PathSubType) ||
84+
(valueIsDefined(ChildrenExist) && !ChildrenExist);
85+
8186
return {
8287
name: Name,
8388
type: mapPathTypeToNavigationTreeType(PathType, PathSubType),
8489
// FIXME: should only be explicitly set to true for tables with indexes
8590
// at the moment of writing there is no property to determine this, fix later
86-
expandable: !isChildlessPathType(PathType, PathSubType) && ChildrenExist,
91+
expandable: !isChildless,
8792
};
8893
});
8994

0 commit comments

Comments
 (0)