shinydnd icon indicating copy to clipboard operation
shinydnd copied to clipboard

how to sense the leaving of a dragUI from a dropUI

Open YuxinZhang9615 opened this issue 7 years ago • 2 comments

I'm building a matching game in r shiny using shinydnd. I need to judge the answer in the end, which is whether each dragUI is in the correct dropUI accordingly. However, the bug here is the dropUI cannot sense the leaving of a dragUI. Or in another word, when I move the dragUI out of a dropUI, the content of the dropUI does not change to NULL or anything else until a new dragUI is dropped in, which makes the judging part really hard to do. I wonder if there is a way to fix it. Thanks

YuxinZhang9615 avatar Jun 20 '17 21:06 YuxinZhang9615

Do you have a simple example with code that you can share with me and the expected behavior?

ayayron avatar Aug 30 '17 18:08 ayayron

hi ayaron, thank you for provuiding this package. it is very useful. I have noticed the same problem. This also happens in your online app. Let's say I want to move one element from one dropUi to another dropUI. the input value from the dropUI from which I have removed the element does not update when I remove it. you can check it in your on line app, if you for example add "foo" to your Drop UI, Reactive you see corretly displayed :"The dropUI element currently contains: foo". But when I move the element "foo" to another drop UI the message reamin unchanged. It will update only if, for example I add another element to the reactive dropUI, let's say"baz". I also wonder if there is a way to fix it. Thanks

lucabirigazzi avatar May 29 '18 14:05 lucabirigazzi