Skip to content

Commit 9a02eb1

Browse files
Emma Goldblumcheton
authored andcommitted
fix infinite tree initialization at the end of componentDidMount
1 parent 4dd067f commit 9a02eb1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/InfiniteTree.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ export default class extends Component {
195195
this.eventHandlers[key] = this.props[key];
196196
this.tree.on(eventName, this.eventHandlers[key]);
197197
});
198+
199+
//force component to rerender when this.tree is finally initialized
200+
this.forceUpdate();
198201
}
199202
componentWillUnmount() {
200203
Object.keys(this.eventHandlers).forEach(key => {

0 commit comments

Comments
 (0)