Repeat table set wrong state

Hi guys!
I have repeater widget filled by data from inputs.

When I want to “mark” one of the newly added rows with “star” icon it turns into blue which is good. But when I add another row then new row is with “grey star” which is good as a default state but it changes the first row to “grey star” too.

How you will be able to help me with it. Thx!

repeat-wrong-state.rp (111.5 KB)

Anytime you add, update, or remove a row from a repeater, the entire repeater is reloaded. If you want to maintain changes (like favoriting), you have to store that information in the repeater.

Add a column to the repeater, like “IsFavorite”, and have the star button click event update that column to “true” for that row.

You’ll, then, have to add a conditional statement to your repeater to check for IsFavorite == “true” then set the gray star to blue.