Open djleven opened 4 months ago
Hey! Any reason you closed it? Was busy the last few days but happy to merge contributions to the project! Thanks for the PR!
Hi Olivier!
Apologies for the late reply, I just saw this now.
I had some second thoughts about how useful this might actually be and ended up closing it.
I would be happy to look at fixing the failing tests this weekend if you still want to merge it.
Thanks!
Hello Olivier,
First of all, thank you for the wonderful contribution that is react-native-dnd.
I needed to access the active droppable Id during drag operations, ideally from the
dndPovider
. TheonDragEnd
event provides us with this at the end of the drag process, but I could not find a way to get the id before. The reason was to manipulate some data unrelated to styling the components (which is already easily doable withuseAnimatedStyle
).I struggled with a few approaches trying to get it from within my droppable component using
useActiveDropReaction
anduseLatestValue
(and even 'hacking' theuseAnimatedStyle
) in combination withrunOnJs
. But they all proved too heavy and costly. Turning to thedndPovider
and exposing the id that was already there seemed the cleanest way to go.It seems to me this could potentiality be a desired feature for many drag and drop type use cases and implementations. Please let me know if I missed something.
Thanks, Kostas