Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit fa35d0a

Browse files
markdowneyalexkuz
authored andcommitted
fix bug for hideRoot=true and shouldExpandNode is false (#53)
1 parent 2e9fe74 commit fa35d0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JSONNestedNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default class JSONNestedNode extends React.Component {
115115
expandable
116116
} = this.props;
117117
const expanded = this.state.expanded;
118-
const renderedChildren = expanded ?
118+
const renderedChildren = expanded || (hideRoot && this.props.level === 0) ?
119119
renderChildNodes({ ...this.props, level: this.props.level + 1 }) : null;
120120

121121
const itemType = (

0 commit comments

Comments
 (0)