Element Events running twice

I have a little swipe plugin I am building to run in repeating groups. It is working fine in terms of detecting the swipe on the correct cell. However, the event seems to fire twice, thus running the workflow twice.

I am running everything from the update function since I have some element fields (properties) I need to retrieve.

Any ideas why this may be happening? Seems like I have heard of this elsewhere but can’t seem to find the remedy or solution.

the update function runs multiple times. If you have properties it probably runs once with empty properties and once with the actual data.
If you trigger the event from the update finction you need to keep track of when it should be triggered. For example you may want to trigger it only when all the data is present, or you want to debounce it ecc.

2 Likes