#Help with REACT Virtualized
1 messages · Page 1 of 1 (latest)
If you could provide us a github repo so we can see how far you've gone we would be able to help you much easier. 🙏
Here is the sandbox, sorry if it's a bit messy but i'm rearranging the code rnow and this was the old version. What i need is a Scroll Snap every time i stop grabbing, so on mouseup, and it should trigger with the stopGrab function. If you could also tell me if there's anything i'm doing in a wrong way it would be very useful for me. https://codesandbox.io/p/sandbox/infinite-slider-pxgzj2?file=%2Fsrc%2FApp.js%3A2%2C21
This is an interesting issue to have. We cannot use native functions like scrollTo as the list is virtualised. I'll need to dig into this a little bit and I'll get back to you as I am not fully familiar with react-virtualized, I haven't used it for ages.
Ok, tysm. I've tried another approach with a brute scroll but It Is far from fluid
In theory, scrollToColumn was made for this purpose. So I am setting that property to the index of the cell that has been clicked as an experiment
I will be working on the forked version of your example, if you want to follow up on it:
https://codesandbox.io/p/sandbox/infinite-slider-forked-gs8kpp?file=%2Fsrc%2FApp.js%3A98%2C1
i've tried a similar approach today but now i'm trying to set the scrollBehavior to smooth only when i release the grab and it's not very fluid, i'll keep working on it and share results