Event to scroll to the top in a ScrollView

Hi, guys!

Is there a way to call an event in a ScrollView to scroll the the view up, similar to web’s “scrollTop” event?

Thanks!

<ScrollTo RelativePosition="0" Target="myScroller" />

Hi, Remi! Thanks for the answer.

I put your code inside a Clicked event in the ScrollView but it returns an error: “Data type not found: ScrollTo” :frowning:

Am I missing something?

Thanks.

Which version of Fuse are you using? If it’s older than v0.20.2 you should try with the latest one: https://www.fusetools.com/downloads

I managed to accomplish this by using “ScrollableGoto”. I read the docs and found out that it’s just a name change. I’m using 0.12 and I think I’ll keep it for now because I don’t wanna see code breaks at some point. I wasn’t even aware of this new release because I’m using the Atom plugin.

I have two more questions:

1 - Is there a way to perform this scroll faster? It seems kinda slow and if I had a lot of texts, the user will wait a bit. I tried to use “Duration” in “ScrollableGoto” but it seems to have no support.

2 - The code of the Examples page will be updated to reflect the new changes in 2.0? How things like the new router/navigation reflects in some of the transitions seen it in https://www.fusetools.com/examples/login-transition. The code in this example still works?

Thanks a ton for the help!

We strongly recommend that you use the latest version as 0.12 will grow old quite quickly (in terms of examples that work etc etc). :slight_smile:

  1. In v0.20 you have <ScrollViewMotion> which should control this, however we’re currently debugging an issue there. In v0.12 there’s nothing like this as far as I know. I’ll let you know as soon as the solution for 0.20 works

  2. All the examples have been updated to work with 0.20 already and the same goes for samples and docs (if you find anything that isn’t this is a bug and we’d love to hear about it).

A lot of the old navigation stuff works as before, although some of it has been changed internally. For docs on the new Router / Navigator setup you can take a look at this: https://www.fusetools.com/docs/navigation/navigation

FYI: The issue with <ScrollViewMotion> has been fixed internally so it’ll be out in a new release in the not-too-distant future.

Thanks, Remi!