mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
feature: updatescrollIntoViewByBlockId API;
This commit is contained in:
@@ -168,11 +168,7 @@ export const TOC = () => {
|
||||
|
||||
const onClick = async (blockId?: string) => {
|
||||
setActiveBlockId(blockId);
|
||||
await editor.scrollManager.scrollIntoViewByBlockId(
|
||||
blockId,
|
||||
'smooth',
|
||||
'primary'
|
||||
);
|
||||
await editor.scrollManager.scrollIntoViewByBlockId(blockId);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user