[FEATURE REQUEST] enhance `scrollTo` prop if put Grid in a `overflow: auto` element
Closed this issue ยท 5 comments
hunterliu1003 commented
In my use case, I put a Grid component in a overflow: auto
element, then the prop scrollTo
not working
<div style="height: 300px; overflow: auto">
<Grid ... scrollTo="activeIndex">...</Grid>
</div>
I think the reason is the prop scrollTo
is implemented with window.scrollTo
.
onUpdated(
once(() => {
windowScrollTo$.subscribe((next) => {
window.scrollTo({ top: next, behavior: "smooth" });
});
})
);
Do you have any ideas or solutions to improve the scrollTo
with my use case?
rocwang commented
I think it should be possible by replacing window
with the grid container.
hunterliu1003 commented
Do you plan to add this functionality?
Btw, I send you one time sponsorship for this great component and your hard work. Thanks
rocwang commented
I'll take a look this weekend. Thanks for the sponsorship! ๐
rocwang commented
This is supported in v1.4.0 now. Let me know if you have any problem with it.
hunterliu1003 commented
It just worked like a charm. Thank you for implementing this feature soooooo fast!