-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
bug(cdk/drag-drop): not possible to use custom drag handle with mat table rows #29475
Labels
area: cdk/drag-drop
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
chintankavathia
added
the
needs triage
This issue needs to be triaged by the team
label
Jul 24, 2024
andrewseguin
added
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
area: cdk/drag-drop
and removed
needs triage
This issue needs to be triaged by the team
labels
Jul 24, 2024
1 task
hope to fix this bug as soon as possible, as it has a significant impact on the user experience. |
@andrewseguin @crisbeto Request experts to improve the progress. This issue has a significant impact on the operation of mobile devices. At present, I have to turn off this function on my mobile phone. I hope it can be repaired as soon as possible. Thank you. |
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 12, 2024
Currently the `cdkDragHandle` directive registers itself with the parent by resolving it through DI. This doesn't work if the directive is declared in a separate embedded view (e.g. `ng-template`) that is then projected into the draggable element. It can be problematic when adding dragging support to a `mat-table`. These changes fix the issue by falling back to resolving the draggable directive through the DOM. Fixes angular#29475.
crisbeto
added a commit
that referenced
this issue
Dec 12, 2024
Currently the `cdkDragHandle` directive registers itself with the parent by resolving it through DI. This doesn't work if the directive is declared in a separate embedded view (e.g. `ng-template`) that is then projected into the draggable element. It can be problematic when adding dragging support to a `mat-table`. These changes fix the issue by falling back to resolving the draggable directive through the DOM. Fixes #29475. (cherry picked from commit a141c22)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: cdk/drag-drop
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Description
CDK Drag and Drop allows to reorder rows within material table however it is not possible to restrict the reordering only using drag handle icon.
Reproduction
StackBlitz link: https://stackblitz.com/edit/vaeujs-yrvig8?file=src%2Fexample%2Fcdk-drag-drop-table-example.html
Steps to reproduce:
cdkDragHandle
to first cell defmat-icon
Expected Behavior
Row should only be dragged using the icon.
Actual Behavior
Rows can be dragged from anywhere within that row.
Environment
The text was updated successfully, but these errors were encountered: