You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using @hello-pangea/dnd in my React application, and I'm trying to implement the combining functionality using the isCombineEnabled prop on the <Droppable> component. However, I'm facing some issues with getting it to work as expected.
In the handleDragEnd function, I'm trying to handle the combining logic when result.combine exists. I'm assigning a new special character to both the combined image and the hovered image, and updating the rankings state accordingly.
However, the combining functionality doesn't seem to work as expected. The images don't stay in place when dragging one image onto another, and the special characters are not assigned correctly.
I've tried adding console.log statements to debug the issue, but it appears that the handleDragEnd function is not being triggered when combining images.
Is there a way to trigger a function or callback when using isCombineEnabled? Or is there a different approach I should take to handle the combining logic correctly?
Any guidance or suggestions would be greatly appreciated. Thank you in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm using
@hello-pangea/dnd
in my React application, and I'm trying to implement the combining functionality using theisCombineEnabled
prop on the<Droppable>
component. However, I'm facing some issues with getting it to work as expected.Currently, I have the following code:
In the
handleDragEnd
function, I'm trying to handle the combining logic whenresult.combine
exists. I'm assigning a new special character to both the combined image and the hovered image, and updating therankings
state accordingly.However, the combining functionality doesn't seem to work as expected. The images don't stay in place when dragging one image onto another, and the special characters are not assigned correctly.
I've tried adding console.log statements to debug the issue, but it appears that the
handleDragEnd
function is not being triggered when combining images.Is there a way to trigger a function or callback when using
isCombineEnabled
? Or is there a different approach I should take to handle the combining logic correctly?Any guidance or suggestions would be greatly appreciated. Thank you in advance!
Best regards,
K33VY
Beta Was this translation helpful? Give feedback.
All reactions