simonwep / selection

✨ Viselect - A high performance and lightweight library to add a visual way of selecting elements, just like on your Desktop. Zero dependencies, super small. Support for major frameworks!
https://simonwep.github.io/selection
MIT License
2.51k stars 147 forks source link

feat(react): expose viewportRef prop in SelectionArea #204

Open rlesniak opened 1 year ago

rlesniak commented 1 year ago

close: #193

Feel free to modify this PR. Feature is backward compatible I tested it in my project and look that it worked exactly I described in my stackblitz

rlesniak commented 1 year ago

I also noticed wrong typing in react props, so fixed it image

simonwep commented 1 year ago

Awesome, thank you! I'll take a closer look at the end of the week :)

simonwep commented 1 year ago

Hey, I'm a bit confused, the issue described in #193 is something in the vanilla / core package. How does this PR fix this issue?

rlesniak commented 1 year ago

Ouu so my fault. Somehow I assumed that it is about react. Anyway, I had exact same issue in React. Fix here is working for me and I am satisfied that I can attach scrollable div to this lib and use it as earlier.