mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat: add frozen scroll method in editor.scrollManager, resolved #564
This commit is contained in:
@@ -62,12 +62,15 @@ export function Page(props: PageProps) {
|
||||
}, [user, props.workspace, page_id]);
|
||||
|
||||
const onScroll = (event: UIEvent) => {
|
||||
editorRef.current.scrollManager.scrollContainer =
|
||||
scrollContainerRef.current;
|
||||
editorRef.current.getHooks().onRootNodeScroll(event);
|
||||
editorRef.current.scrollManager.emitScrollEvent(event);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
editorRef.current.scrollManager.scrollContainer =
|
||||
scrollContainerRef.current;
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<LigoApp>
|
||||
<LigoLeftContainer style={{ width: fixedDisplay ? '300px' : 0 }}>
|
||||
|
||||
Reference in New Issue
Block a user