diff --git a/apps/web/src/components/pure/workspace-slider-bar/index.tsx b/apps/web/src/components/pure/workspace-slider-bar/index.tsx index 2085dec7df..1b8efe0512 100644 --- a/apps/web/src/components/pure/workspace-slider-bar/index.tsx +++ b/apps/web/src/components/pure/workspace-slider-bar/index.tsx @@ -49,8 +49,15 @@ const FavoriteList: React.FC = ({ () => pageMeta.filter(p => p.favorite && !p.trash), [pageMeta] ); + return ( - + {favoriteList.map((pageMeta, index) => { const active = router.query.pageId === pageMeta.id; return ( @@ -58,6 +65,11 @@ const FavoriteList: React.FC = ({ { + if (ref && active) { + ref.scrollIntoView({ behavior: 'smooth' }); + } + }} onClick={() => { if (active) { return;