1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

render optimize

This commit is contained in:
Fedor Katurov 2019-11-07 17:15:31 +07:00
parent a1227b658b
commit 383990d556

View file

@ -97,6 +97,10 @@ const NodeImageSlideBlock: FC<IProps> = ({ node, is_loading, updateLayout }) =>
} else {
setHeightThrottled(now);
}
// update layout after all manipulations
const timeout = setTimeout(() => updateLayout(), 500);
return () => clearTimeout(timeout);
}, [is_dragging, wrap, offset, heights, max_height, images, is_loading]);
const onDrag = useCallback(