Skip to content

Commit ae8aa6d

Browse files
feat(SchemaTree): do not expand childless nodes (#1868)
1 parent 36038bc commit ae8aa6d

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"use-query-params": "^2.2.1",
5555
"uuid": "^10.0.0",
5656
"web-vitals": "^1.1.2",
57-
"ydb-ui-components": "^4.3.2",
57+
"ydb-ui-components": "^4.4.0",
5858
"zod": "^3.24.1"
5959
},
6060
"scripts": {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ export function SchemaTree(props: SchemaTreeProps) {
7676
const {PathDescription: {Children = []} = {}} = schemaData;
7777

7878
const childItems = Children.map((childData) => {
79-
const {Name = '', PathType, PathSubType} = childData;
79+
const {Name = '', PathType, PathSubType, ChildrenExist} = childData;
8080

8181
return {
8282
name: Name,
8383
type: mapPathTypeToNavigationTreeType(PathType, PathSubType),
8484
// FIXME: should only be explicitly set to true for tables with indexes
8585
// at the moment of writing there is no property to determine this, fix later
86-
expandable: !isChildlessPathType(PathType, PathSubType),
86+
expandable: !isChildlessPathType(PathType, PathSubType) && ChildrenExist,
8787
};
8888
});
8989

src/types/api/schema/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export interface TDirEntry {
112112
PathVersion?: string;
113113
PathSubType?: EPathSubType;
114114
Version?: TPathVersion;
115+
ChildrenExist?: boolean;
115116
}
116117

117118
interface TDomainDescription {

0 commit comments

Comments
 (0)