react-plx icon indicating copy to clipboard operation
react-plx copied to clipboard

Support scrolling on non-window element

Open Akkuma opened this issue 6 years ago • 4 comments

Thanks for making react-plx. I've ran into a semi-serious feature that doesn't yet exist in that all scroll events are expected to come from the window. This makes it impossible to do something like body { overflow: hidden; } and have some child element actually be the one scrolling.

The feature request would be for plx to accept a scroll target, which means implementing it in both plx and scroll manager.

Akkuma avatar Jun 18 '18 16:06 Akkuma

Hello @Akkuma, It is a tricky one indeed. I had an idea of adding scrollPosition (or just position) prop, and if it is passed it should be used instead of window scroll tracking. It would cover your case (scrolling elements instead of widow) but it would add additional flexibility.

It shouldn't be too hard, but I have a lot of going on atm, so I'm not sure when I'll get to it.

Cheers!

Stanko avatar Jun 19 '18 09:06 Stanko

+1 on this

ZakTax avatar Jul 30 '18 20:07 ZakTax

Anyone working on this subject?

Got all my animations working with react-plx, but after applying the full layout, I had to move the scroll target to a specific div tag and... damn. :(

josantana avatar Dec 10 '19 12:12 josantana

I don't have time to tackle this ATM, but I would gladly accept a PR.

Stanko avatar Dec 10 '19 12:12 Stanko