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

DataTable mixed plugins DragAndDrop with Edit mode should disable DragAndDrop #920

Closed
howudodat opened this issue Feb 27, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request version 2.x.x Version 2.x.x issues
Milestone

Comments

@howudodat
Copy link

Describe the bug
DataTable with both DragDropPlugin and edit mode, doesn't prevent the drag while in edit mode.

To Reproduce
Create DataTable with DragDropPlugin
Edit a row
Click Drag to select text in a textbox

Expected behavior
The drag event shouldn't bubble to the Drag plugin when the row is in edit mode;

Screenshots
image

@vegegoku vegegoku self-assigned this Mar 18, 2024
@vegegoku vegegoku added the enhancement New feature or request label Mar 18, 2024
@vegegoku vegegoku added this to the 2.0.1 milestone Mar 18, 2024
@vegegoku vegegoku added the version 2.x.x Version 2.x.x issues label Mar 18, 2024
vegegoku added a commit that referenced this issue Apr 14, 2024
@vegegoku
Copy link
Member

Instead of disable drag/drop by default in such case which is actually a case that span between different plugins, we introduced new configuration and API to allow working around this while keeping it possible for others who might want to still drag/drop while in edit mode.

now you can use the following configuration to temporary enable/disable the operation

 tableConfig
     .setOnRowEditHandler(row** -> row.setDraggable(false))
     .setOnRowFinishEditHandler(row -> row.setDraggable(true));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request version 2.x.x Version 2.x.x issues
Projects
None yet
Development

No branches or pull requests

2 participants