Skip to content

Can't restrict Table drag to a drag handle #9739

@distinctdan

Description

@distinctdan

Provide a general summary of the issue here

I'm trying to use Table with drag-and-drop. Each row has editable fields, and when you try to select the text in the field, the whole row starts dragging instead. In my Table, I added a button like the docs said like with a drag slot <Button slot="drag">, but the whole row is still draggable.

Image

🤔 Expected Behavior?

In a Table, adding <Button slot="drag"> should act as a drag handle, so that drags can only start by dragging the button.

😯 Current Behavior

It doesn't work, the whole row is still draggable.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

Drag the row

Version

1.11.0 react-aria-components

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Mac

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions