Use selection group within repeater


#1

Hi,

I’m prototyping a feature where I have a repeater table. Inside each row in the repeater there’s a checkbox (custom made with a rectangle).

I would like this checkbox to only be active within one repeater row, and not all of them. So if the user checks it in one of them I want it to be disabled in the rest of them until it becomes unchecked.

Does anyone have any idea on how I could do this?

Many thanks,


#2

Hi!

By default, selection groups are exclusive (a.k.a., “isolated”) within the repeater row, not across rows. Go to the interactions tab and turn off Isolate Selection Groups.

image


#3

This is a great answer to the selection group problem (having one be selected and automatically deselect the other rows) but what about the disable function?

I’m trying to do the same thing…

If I click a row in the repeater I want the following to happen

Set the row that was clicked as selected
Set the other rows as unselected (this was covered by your response)
Disable the other rows

If the user clicks that selected row

Deselect the row
Enable all rows

Please help! :slight_smile:


#4

Hi @nmanring!

Thanks for writing in to support@axure.com with your question as well and I think I may have the solution for you.

To achieve this I used two sets of interactions with two cases each. On the repeater widget level, the “Loaded” interaction resets the widget to the unselected state while one case enables it, the other case disables it. This is to differentiate between the selected and unselected state.

Repeater%20Interactions

On the repeater’s item, I included a “Click or Tap” interaction that changes a placeholder value used by the “Loaded” condition, as well as fires the respective “Loaded” event. In addition, if nothing is selected, one case triggers the respective “Loaded” case and sets a single row as selected and enabled while the other case triggers a reset and enabling of all rows.

Group%20Interactions

Keep in mind, the placement of the interactions affects the firing order and will generally need to fire in this sequence. I have included my example file below:
Select and Disable Axure Sample.rp (51.1 KB)

Hope that helps!