-
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
Comments
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. |
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.
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)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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: