[Drag And Drop Mobile] Converting this component to React

Forge Component
(8)
Published on 2018-12-20 by Labs
8 votes
Published on 2018-12-20 by Labs

Hi currently using the latest outsystems version. Came across your drag and drop widget and I'm trying to apply what you made to react since I cannot use jquery. I tried changing the TouchEvent to MouseEvent if I clicked on an item it grabs the item I have, but once I try to move the item it releases instantly. But If I set it back to TouchEvent it only works for react in mobile device view.

Is there a way I can make what you implemented work for MouseEvent?

Clintjie Lo wrote:

Hi currently using the latest outsystems version. Came across your drag and drop widget and I'm trying to apply what you made to react since I cannot use jquery. I tried changing the TouchEvent to MouseEvent if I clicked on an item it grabs the item I have, but once I try to move the item it releases instantly. But If I set it back to TouchEvent it only works for react in mobile device view.

Is there a way I can make what you implemented work for MouseEvent?

Hi,


i think the TouchEvent is only using to mobile and the MouseEvent to computer. You want to try using where? Computer or mobile?


My solution is put inside a if and the condition is GetDeviceType, and if is a computer, use the MouseEvent, if not use ToucEvent.


Cheers