mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
render optimize
This commit is contained in:
parent
a1227b658b
commit
383990d556
1 changed files with 4 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue