Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[selectOnClick]="false" option prevents initiating a drag box between items #144

Open
gavinharriss opened this issue Nov 30, 2021 · 5 comments · May be fixed by #167
Open

[selectOnClick]="false" option prevents initiating a drag box between items #144

gavinharriss opened this issue Nov 30, 2021 · 5 comments · May be fixed by #167

Comments

@gavinharriss
Copy link

If you take the README.md https://stackblitz.com/edit/ngx-drag-to-select?file=app%2Fpages%2Fhome%2Fhome.component.html link and add the [selectOnClick]="false" you'll find that the drag box can no longer be initiated from between card items. It's only possible to initiate a selection from the dts-select-container borders.

@d3lm
Copy link
Owner

d3lm commented Nov 30, 2021

Hey there! Thanks for reporting this issue. Please provide a reproduction link using StackBlitz.

@gavinharriss
Copy link
Author

No worries, here you go: https://stackblitz.com/edit/ngx-drag-to-select-5xjaaj?file=src%2Fapp%2Fapp.component.html

Just something I noticed while looking at the solution as a potential option to a problem I'm solving.

A screenshot from your live demo - https://d3lm.github.io/ngx-drag-to-select/
2021-12-01 09_16_56-Angular Drag-to-Select_ v4 2 0_ v4 2 0

@d3lm
Copy link
Owner

d3lm commented Dec 1, 2021

Ah yes, I see. This seems to be a bug indeed.

@GRX
Copy link

GRX commented Aug 26, 2022

@gavinharriss did you happen to find a workaround for this?

In my specific case, when you select a group, you should be able to drag that selected group to a different position.
Currently, after selecting multiple elements, trying to drag them updates the selection to the single entity you're trying to move.

When [selectOnClick]="false" is set, dragging to select is not working at all anymore :(

@gavinharriss
Copy link
Author

@GRX sorry, I never found a fix for the issue.

PhOder pushed a commit to PhOder/ngx-drag-to-select that referenced this issue Nov 28, 2022
This commit fixes the issue of not being able to start a selection if
mousedown occured on neither Host element nor select item element
but inbetween. The issue occurs if `SelectItem`s are not direct children
of the `SelectContainer`.

Fixes d3lm#144
@PhOder PhOder linked a pull request Nov 28, 2022 that will close this issue
PhOder pushed a commit to PhOder/ngx-drag-to-select that referenced this issue Jul 31, 2024
This commit fixes the issue of not being able to start a selection if
mousedown occured on neither Host element nor select item element
but inbetween. The issue occurs if `SelectItem`s are not direct children
of the `SelectContainer`.

Fixes d3lm#144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants