mirror of
https://github.com/penpot/penpot.git
synced 2025-05-14 05:06:39 +02:00
🐛 Fix page always visible when selecting it in sitemap
This commit is contained in:
parent
df73df311b
commit
2974fb0f4e
2 changed files with 8 additions and 0 deletions
|
@ -102,6 +102,13 @@
|
|||
:index index
|
||||
:name (:name page)})]
|
||||
|
||||
(mf/use-effect
|
||||
(mf/deps selected?)
|
||||
(fn []
|
||||
(when selected?
|
||||
(let [node (mf/ref-val dref)]
|
||||
(.scrollIntoViewIfNeeded ^js node)))))
|
||||
|
||||
(mf/use-layout-effect
|
||||
(mf/deps (:edition @local))
|
||||
(fn []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue