# Reseting ScrollView without an animation

**URL:** <https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588>\
**Category:** How-to Discussions\
**Created:** [May 29, 2017, 2:34pm UTC](https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588 "2017-05-29T14:34:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matti\_Tihverainen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/matti_tihverainen/32/684_2.png) [@Matti\_Tihverainen](https://forums.fusetools.com/u/Matti_Tihverainen)\
**Post date:** [May 29, 2017, 2:34pm UTC](https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588/1 "2017-05-29T14:34:30Z")

</div>

Hello! Is there a way to reset the ScrollView’s position without an animation? If I use Set for the ScrollPosition, the ScrollView animates to the top.

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [May 29, 2017, 4:50pm UTC](https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588/2 "2017-05-29T16:50:57Z")

</div>

`ScrollView` has a [seekTo](https://www.fusetools.com/docs/fuse/controls/scrollviewbase/seekto_8607b30c) JS method that bypasses the scrolling animation.

---

<div class="post-metadata">

**Author:** ![Matti\_Tihverainen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/matti_tihverainen/32/684_2.png) [@Matti\_Tihverainen](https://forums.fusetools.com/u/Matti_Tihverainen)\
**Post date:** [May 29, 2017, 4:56pm UTC](https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588/3 "2017-05-29T16:56:15Z")

</div>

Thank you! Though I think I found the solution also with a trigger:

`<WhileTrue Value="{scrollReset}"><Set Target="ScrollView.ScrollPosition" Value="0,0" /</WhileTrue>`

Basically I set the scrollReset to False before emptying the Items and after Items are recreated, I set the scrollReset to True which bumps the ScrollView back up.

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [May 29, 2017, 4:59pm UTC](https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588/4 "2017-05-29T16:59:43Z")

</div>

Well if you’re using JS to _recreate_ items, it would make sense if you reset the position in JS too.

Putting one-timers such as `Set` inside of `While*`-triggers is generally a bad practice. Those belong in Pulse triggers.

---

<div class="post-metadata">

**Author:** ![Matti\_Tihverainen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/matti_tihverainen/32/684_2.png) [@Matti\_Tihverainen](https://forums.fusetools.com/u/Matti_Tihverainen)\
**Post date:** [May 29, 2017, 5:15pm UTC](https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588/5 "2017-05-29T17:15:35Z")

</div>

Ok! Is there a good example of controlling UX elements via JS? I understand the method of UX-\>JS, but how do I do JS-\>UX to use seekTo?

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [May 29, 2017, 5:17pm UTC](https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588/6 "2017-05-29T17:17:35Z")

</div>

You simply refer to the UX element by the `ux:Name` you give it. You obviously need to be in the same data context for this to work.

Since this deviates from the original question of the thread, if you have further unrelated questions please post them in separate threads.

---

<div class="post-metadata">

**Author:** ![Matti\_Tihverainen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/matti_tihverainen/32/684_2.png) [@Matti\_Tihverainen](https://forums.fusetools.com/u/Matti_Tihverainen)\
**Post date:** [May 29, 2017, 5:26pm UTC](https://forums.fusetools.com/t/reseting-scrollview-without-an-animation/2588/7 "2017-05-29T17:26:22Z")

</div>

Ok, thank you!
