Repater Deselecting Corresponding Row Button


#1

Hi Folks.
I am not a native English speaker and I have tried searching for the solution to the problem I have but have not found a solution.

The current situation -
I currently have two repeater tables.

  1. When I click a button on Repeater 1, it sets that button to the selected state (this allows me to customize it to look differently once it has been selected). It then also adds the row to Repeater 2
    image

  2. When I click a button on Repeater 2 it delete its corresponding row.

My Problem -
When I click the close button (BRTClose) in step 2, I want it to deselect the correct button (HRTBookmark) in step 1.

In this example I clicked on the bookmark button on Row 1 and 3, This then changed the style of the bookmark icon so I can see it visually. When I click the close button of row 1 on Repeater 2, it should deselect the corresponding bookmark icon on Repeater 1.

Please let me know if anything is unclear.
Thank you for taking the time to read through!


#2

Because a repeater takes a widget(s) and copies it many times, it can sometimes be hard to target just a single row from an external interaction (like a second repeater).

However, a great way to do this is to use a strategy that allows the whole repeater to consider each row and under a condition, target the specific row we want.

To explain, we can have the external button (your close button) contain a “Move” action that will move the desired repeater or internal widgets by 0,0. We don’t actually want the repeater to move, but we want this action to be able to trigger an “event listener”. To add the event listener, we can select the desired widget and add a "Moved > [Desired Interaction]. Then add conditional logic on how you want the rows to be considered.

In this example, I have added the following interactions to the Close widget on repeater 2 and Bookmark widget on repeater 1. I also attached the .rp file so you can see it in action.

image

image

Repeater Event Listeners.rp (49.3 KB)

Hope that helps!


#3

Hi Ben Hoang,

Thank you very much for the response and the thorough explanation. This worked great and I implemented it into my project!


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.