Improve stpedded rendering

This commit is contained in:
Thomas Nordquist
2019-02-17 08:35:05 +01:00
parent 688abbd999
commit e6ecfde339

View File

@@ -55,9 +55,9 @@ class TreeNodeSubnodes extends React.Component<Props, State> {
}
private renderMore() {
this.renderMoreAnimationFrame = window.requestAnimationFrame(() => {
this.renderMoreAnimationFrame = window.requestIdleCallback(() => {
this.setState({ ...this.state, alreadyAdded: this.state.alreadyAdded * 1.5 })
})
}, { timeout: 500 })
}
public componentWillUnmount() {