[Drag And Drop in Reactive] OnDropEvent for this component
Question
Forge component by Sadanand H

Hi Sadanand,

First, thanks for supplying this component to the forge. The dragging and dropping works like a charm. However I miss one thing. How can react to the dropping of the element. So I'm looking for onDrop event, which I cannot find in your component?

Did I overlook something?

Kind regards,

Matthieu de Graaf

Solution

wilko odijk wrote:

Hi Sadanand,

Maybe it is the same question as from Matthieu. I got some items in a list to drag and drop. Works like a charm. Now, based on the drag and drop, i want to save some data to a table. Let's say my items in the list come from a table that has an order attribute. So i use the drag and drop to re-order the list. After an item is dropped, i want to have some logic that updates the order in the table.

My JS is not soooo good, how would i be able to do that? So the logic is preferrable not in JS, but an action / event.

Thanks ahead,

Wilko


Wilko,

You can use the same event as i mentioned above, the OnEnd Event.  And inside that you can call a client action like this $actions.[YourClientActionName]. 

Hi Matthieu,


Uploaded a new version with more details regarding the component. 

I think what you are looking for is the OnEnd Event. This is triggered when the Element dragging ends. 

If you need an example, you can find how to use it with this new version.


Best Regards,

Diogo Romero

Hi Sadanand,

Maybe it is the same question as from Matthieu. I got some items in a list to drag and drop. Works like a charm. Now, based on the drag and drop, i want to save some data to a table. Let's say my items in the list come from a table that has an order attribute. So i use the drag and drop to re-order the list. After an item is dropped, i want to have some logic that updates the order in the table.

My JS is not soooo good, how would i be able to do that? So the logic is preferrable not in JS, but an action / event.

Thanks ahead,

Wilko

Solution

wilko odijk wrote:

Hi Sadanand,

Maybe it is the same question as from Matthieu. I got some items in a list to drag and drop. Works like a charm. Now, based on the drag and drop, i want to save some data to a table. Let's say my items in the list come from a table that has an order attribute. So i use the drag and drop to re-order the list. After an item is dropped, i want to have some logic that updates the order in the table.

My JS is not soooo good, how would i be able to do that? So the logic is preferrable not in JS, but an action / event.

Thanks ahead,

Wilko


Wilko,

You can use the same event as i mentioned above, the OnEnd Event.  And inside that you can call a client action like this $actions.[YourClientActionName]. 

Hi Diogo,


Thanks for the extra functionality. This is really an improvement for me.


Matthieu de Graaf

Matthieu de Graaf wrote:

Hi Diogo,


Thanks for the extra functionality. This is really an improvement for me.


Matthieu de Graaf


Welcome Matthieu. 

Pls mark the answer as resolved in that case, to keep track of unanswered questions regarding this plugin :)

Thank you !


Diogo Romero

Hi Diogo,

i managed to get it to work, thaks for the help.

Wilko

Heys guys,


could you post some examples using OnEnd event. my JS is horrible. I'm getting this error and I did not found where is it.


Thanks.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.