d3lm / ngx-drag-to-select

A lightweight, fast, configurable and reactive drag-to-select component for Angular 10 and beyond
https://www.npmjs.com/package/ngx-drag-to-select
MIT License
293 stars 65 forks source link

Selection is not working when combined with virtual scrolling #113

Open 4nshuman opened 4 years ago

4nshuman commented 4 years ago

Hi there,

I am using the library paired with the virtual scroll, in this case, although the update method is called but the selection is erratic. As soon as I scroll down, the selected array goes to null and the style is not changed. Has anyone else faced this issue ?

Here's a link to check : https://stackblitz.com/edit/ngx-drag-to-select-virtual-scroll?file=src/app/app.component.html

Could someone please help me with this, is there a workaround ? Thanks.

d3lm commented 4 years ago

Hey! Wow, that's super strange. I have not used it together with the CDK's virtual scrolling, but I do know that other modules from the CDK like the drag and drop cause very strange behavior, and the often intercept events etc.

I do not know what's going on the your case, and would need to investigate myself. Would you be willing to debug this and try to find out what's causing this? Get to the bottom of this?

Maybe somebody else ran into this issue already and has some insights. Not sure tho.

PR is welcome!

4nshuman commented 4 years ago

Sure thing. I'll take a look into this and try to debug.

d3lm commented 4 years ago

Thank you very much! Really curious about your findings. If you find the culprit then let's get that fix in.