Closed Eagleseb closed 2 years ago
Hey. Please provide a reproduction using stackblitz.com. I am pretty busy right now so I can't look into it and would appreciate a PR.
Hello, thanks for your reply. Here's a fork of the project stackblitz putting the issue in evidence: https://stackblitz.com/edit/ngx-drag-to-select-7gyu4j?file=src/app/app.component.html
as you can see, with [dtsSelectItem]="document.id", selecting the document with id 0 (falsy) wrongly select the DTS directive instead of the id:
I'll open a PR in a few days
Minimal template to reproduce issue:
Selecting div item will call selectItems method with array [SelectItemDirective] instead of [0]. Same thing for any dstSelectItem with falsy value. I think this is because internally, SelectItemDirective.value checks if dtsSelectItem is truthy. Instead it should check if dtsSelectItem !== undefined.
I can push a PR if you are interested.
Sorry if I'm not opening an issue correctly, first contribution here.