Swipe Action in a RG's cell

Hi everyone :slight_smile:
I have just read through a lot and am very desperate about one (actually simple) thing, here is my initial situation:

I have a RepeatingGroup that shows all notifications of a user in multiple cells. What I simply want is when the user swipes left in the current cell of the RG, a delete icon on the right hand side should be visible and the user can click it.
My problem is that when I use plugins like TikTok like swipe, JavaScript Swipe Detector, BetterSwipev2, Swipe detector,… it does not work. I tried to set a custom status for a group in the RG (custom status: delete-icon-visible “yes/no” default “no”). And then when the user swipes left, action: set state of the group… to “yes” and make the delete-icon visible when this custom state is “yes” (and hide the other group, I tried both). I also tried the simple action when a user swipes left: “show an element” (delete-icon), which was also unsuccessful. All swipe plugins failed to reference the current repeatinggroup cell. Either they displayed all delete icons of all cells of the RG, or they did not display a delete icon at all.
The only way it worked was with the plugin Draggable Elements, which is not what I want because it’s not really a responsive swipe for my problem.

Is there a solution for my problem? Is there a responsive way, how I can show the delete-icon only in the current cell of my RG when the user swipes this cell to the left? Any plugin recommendations or am I just too stupid to use them? :pleading_face:

I have decided to take this as a challenge for myself. I have tried all the free plugins there are and bumped into the same roadblock as you. They work great but not in a repeating group. They apply the same thing to each cell (view button in each cell etc.)

Then, I decided to give Draggable Elements - Bubble Docs another chance. And I have the following behavior now :slight_smile:

swipe

Now the technical details.

Here is the element tree and what is inside the repeating group.
image

And this is the designer:

The blue is the DropArea. The green is the Drag/dropGroup. And yellow is the Trash group.

The idea is having this Drag/dropGroup stay on the left of the screen and it can be dragged into the DropArea. However, when the dropArea receives something, it will show the Trash group and put the Green area back and hide it. I set the green area to low transparency, that’s why it look invisible. Of course, the green area is blocked, no clicks can happen.
It actually works like this:
swipe-details

And here are the other layouts and conditionals of all the groups I mentioned:



And here are the workflows:
image
image
image
image

Known issues:
Sometimes the dragged group stuck over there whever is left and doesn’t come back (even if it is set to come back to the original position). I have tested and it is probably because I conditionally hide it. Maybe there is a solution, I don’t know.

6 Likes

Thanks hergin, that could be a great solution. But in my case I need the whole cell in the RG for elements like text, images and so on…
So it won’t be very pretty if I would let a big space for the Drag/dropGroup.

Any other solutions?

@lemw.business

Easy piecy. Place all of your goodies inside the draggable group that @hergin so kindly built.

Lot of work from Hergin here …, and he hit the nail on the head as far as what the post calls for is concerned :smiley:

2 Likes

You’re quickly becoming one of my favourite posters in the forum!

Your responses are always well thought out and explained. :clap:

3 Likes

As @cmarchan suggested, I could put some more button in the draggable. Although it looks weird (because it is swiped different than the company name), it works. You can click on the buttons though while swiping, so need to be careful while designing this interface.
draggable-2

You can put the company name and other stuff in there too but if you make the width of the draggable 100%, someone has to swipe back to hide it, instead of clicking.
draggable-3

Another problem I couldn’t figure out yet. If I click outside the repeating group, can I hide all the trash groups? No answer yet.

1 Like
  1. It works, I got no problems now. Thanks a lot!
    I work with a custom state, maybe you could also do. When Element XYZ (outsite the RG) is clicked, set state of Drag/dropGroup to…

  2. I had the same problem you described above in your first answer:
    " Known issues:
    Sometimes the dragged group stuck over there whever is left and doesn’t come back (even if it is set to come back to the original position). I have tested and it is probably because I conditionally hide it. Maybe there is a solution, I don’t know."

The solution I got was just to edit the Drag/dropGroup’s behaviour post drop to “move back”, after that it worked.
image

I used the move back too. But it is still not consistent. Most of the time it works though. Good luck.

1 Like