We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55d414f commit 1d23140Copy full SHA for 1d23140
src/app/pages/SandboxView/Sandbox/Editor/Workspace/Files/DirectoryEntry/index.js
@@ -64,10 +64,16 @@ type State = {
64
};
65
class DirectoryEntry extends React.PureComponent {
66
props: Props;
67
- state: State = {
68
- creating: '',
69
- open: false,
70
- };
+ state: State;
+
+ constructor(props) {
+ super(props);
71
72
+ this.state = {
73
+ creating: '',
74
+ open: props.root,
75
+ };
76
+ }
77
78
resetState = () => this.setState({ creating: '' });
79
@@ -207,7 +213,7 @@ class DirectoryEntry extends React.PureComponent {
207
213
closeTree={this.closeTree}
208
214
/>
209
215
</EntryContainer>
210
- <Opener open={root || open}>
216
+ <Opener open={open}>
211
217
{creating === 'directory' &&
212
218
<Entry
219
id=""
0 commit comments