We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the problem If the onDrag returns false on a Draggable item, the Droppable will become disabled in a dragging state.
onDrag
Draggable
Droppable
dragging
How do you reproduce the problem? Test by setting onDrag={() => false} on the DragDrop in an example https://www.patternfly.org/components/drag-and-drop#basic
onDrag={() => false}
DragDrop
Expected behavior You cannot drag an item that returns false for onDrag, but it also should not set the dragging modifier on the Droppable element.
Any other information? From this convo: https://patternfly.slack.com/archives/C4FM977N0/p1695122245413489
Looks like in Draggable.tsx when we check !onDrag(...), we could do droppableItems.forEach(item => resetDroppableItem(item)); before returning.
Draggable.tsx
!onDrag(...)
droppableItems.forEach(item => resetDroppableItem(item));
The text was updated successfully, but these errors were encountered:
gitdallas
Successfully merging a pull request may close this issue.
Describe the problem
If the
onDrag
returns false on aDraggable
item, theDroppable
will become disabled in adragging
state.How do you reproduce the problem?
Test by setting
onDrag={() => false}
on theDragDrop
in an example https://www.patternfly.org/components/drag-and-drop#basicExpected behavior
You cannot drag an item that returns false for
onDrag
, but it also should not set thedragging
modifier on theDroppable
element.Any other information?
From this convo: https://patternfly.slack.com/archives/C4FM977N0/p1695122245413489
Looks like in
Draggable.tsx
when we check!onDrag(...)
, we could dodroppableItems.forEach(item => resetDroppableItem(item));
before returning.The text was updated successfully, but these errors were encountered: