Scroll to top on DOM re-render

This commit is contained in:
Jeremy Dormitzer 2018-01-20 18:01:16 -05:00
parent 4063d48e2b
commit 2b5aef4215
No known key found for this signature in database
GPG Key ID: 04F17C0F5A32C320

View File

@ -163,6 +163,7 @@
[$sidebar-dom]
(let [$container (dom/getElement "sidebarContent")]
(dom/removeChildren $container)
(.scrollTo js/window 0 0)
(if (seqable? $sidebar-dom)
(apply dom/append $container $sidebar-dom)
(dom/append $container $sidebar-dom))))