I’m looking for a more efficient way to handle scenarios like repeating groups built as multi-select dropdowns.
I am sure there must be some obvious hack I’m missing, but I haven’t found it yet.
Scenario:
- Store selected options in a repeating group or state variable
- When user clicks a cell, need to toggle that option (add if not present, remove if present)
My current implementation (3 actions):
- ‘Is Selected’ custom event checks if option exists in list and returns data
- If not in list: Display list with :plus item
- If in list: Display list with :minus item
Is there a way to accomplish this toggle functionality in a single expression instead of three separate actions? If not, what do you think is the best way to do it?