mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
editor: increase force update debounce timeout to 200ms
This commit is contained in:
committed by
Abdullah Atta
parent
ec898748b1
commit
6fae73b612
@@ -47,14 +47,10 @@ export const useEditor = (
|
|||||||
instance.on("transaction", () => {
|
instance.on("transaction", () => {
|
||||||
clearTimeout(updateTimeout.current);
|
clearTimeout(updateTimeout.current);
|
||||||
updateTimeout.current = setTimeout(() => {
|
updateTimeout.current = setTimeout(() => {
|
||||||
requestAnimationFrame(() => {
|
|
||||||
requestAnimationFrame(() => {
|
|
||||||
if (isMounted) {
|
if (isMounted) {
|
||||||
forceUpdate();
|
forceUpdate();
|
||||||
}
|
}
|
||||||
});
|
}, 200) as unknown as number;
|
||||||
});
|
|
||||||
}, 100) as unknown as number;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user