Closed lemmywrap closed 2 years ago
As far as I understand, I can either do: <mat-card [dtsSelectItem]> or the following: <mat-card [dtsSelectItem]="document.id">
<mat-card [dtsSelectItem]>
<mat-card [dtsSelectItem]="document.id">
When using the latter however, I have noticed that when the items are updated, the selection is reset.
To reproduce, see the following stackblitz
Problem is caused here, I think: https://github.com/d3lm/ngx-drag-to-select/blob/4b12a79d381547ed3ca046d958cb4b1633d535f9/projects/ngx-drag-to-select/src/lib/select-container.component.ts#L347
selectedItems will be of type number[], while newList is of type SelectItemDirective[].
selectedItems
number[]
newList
SelectItemDirective[]
Thanks for reporting this issue. I am not sure if I have the capacity to look into this right now. Would you be down to fix this and submit a PR?
As far as I understand, I can either do:
<mat-card [dtsSelectItem]>
or the following:<mat-card [dtsSelectItem]="document.id">
When using the latter however, I have noticed that when the items are updated, the selection is reset.
To reproduce, see the following stackblitz
Problem is caused here, I think: https://github.com/d3lm/ngx-drag-to-select/blob/4b12a79d381547ed3ca046d958cb4b1633d535f9/projects/ngx-drag-to-select/src/lib/select-container.component.ts#L347
selectedItems
will be of typenumber[]
, whilenewList
is of typeSelectItemDirective[]
.