Fix three rendering when loading (#986)
The problem is that syncActionResult wasn't using batching.
This commit is contained in:
parent
e9f5175f51
commit
0dc07135b7
@ -186,10 +186,8 @@ export class App extends React.Component<any, AppState> {
|
||||
this.actionManager.registerAction(createRedoAction(history));
|
||||
}
|
||||
|
||||
private syncActionResult = (
|
||||
res: ActionResult,
|
||||
commitToHistory: boolean = true,
|
||||
) => {
|
||||
private syncActionResult = withBatchedUpdates(
|
||||
(res: ActionResult, commitToHistory: boolean = true) => {
|
||||
if (this.unmounted) {
|
||||
return;
|
||||
}
|
||||
@ -210,7 +208,8 @@ export class App extends React.Component<any, AppState> {
|
||||
collaborators: state.collaborators,
|
||||
}));
|
||||
}
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
private onCut = withBatchedUpdates((event: ClipboardEvent) => {
|
||||
if (isWritableElement(event.target)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user