Closed richard-viney closed 6 months ago
Good day @richard-viney :)
It depends on how you used the old scroll
function - it provided many "goodies" which you (depending whether you used them) would need to adapt yourself.
Generally you can scroll like this:
const { scrollOffsetElement } = osInstance.elements();
// using the native scrollTo function: https://developer.mozilla.org/en-US/docs/Web/API/Element
scrollOffsetElement.scrollTo({ top: 100, left: 100, behavior: 'smooth' });
If you want to scroll to a certain element you can use the element.scrollIntoView function for that.
In case you need more features you currently have to adapt them on your own.
@richard-viney does that solve your problem? :)
Yep it does, thanks!
The docs say
The scroll function is missing. Planned as a plugin. (WIP)
- is there a workaround for this or alternatives to achieve a similar thing?This is blocking the upgrade from v1 to v2 for us (though v1 is still working completely fine).
Thanks.