-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Managed Scrolling #11
Comments
hello sorry for the delayed response! I think at this time it is something I wouldn't put into the library as scrolling can get hairy really quickly, but I think it could possibly be accomplished using the I'd have to play with it a bit, but what I'm thinking is if you included a function to scroll to the element on the <ScrollView ref={this.scrollView}>
<WalkthroughElement
id="element-1"
tooltipProps={{
onClose: () => this.scrollView.current.scrollTo({ y: POSITION_OF_ELEMENT_2 })
}}
>
<Element1>
</WalkthroughElement>
<WalkthroughElement id="element-2">
<Element2>
</WalkthroughElement>
</ScrollView> I think something like that could work. If you get a chance to play with it let me know! |
@jasongaare I tried using the example you posted above, but by passing an Can the |
Just in case this helps someone else out (and I'm certain this isn't the cleanest way, but it's a start)...I am wrapping the walkthrough elements with a view that onLayout stores all the positions of the walkthroughElements:
And then in the parent component I listen for the update and scroll to it
|
@jasongaare First off thanks for your work putting this together- awesome library!
In my project, I'm using this library to display a walkthrough on elements within a
ScrollView
. Some of the elements are initially below-the-fold and not visible until you scroll down.Right now, when I target below-the-fold elements, the modal overlay is shown, but I cannot see the tooltip.
I'd like to use a single guide for all the elements on the page, and have the library automatically scroll the below-the-fold elements into view. Do you think we should implement this into the library or do you know of a different way to manage this?
Happy to write a PR if you think it should be included. Best!
The text was updated successfully, but these errors were encountered: