How do I present a list of selected values?

So just to document how I solved this problem for future reference and in case someone needs to make something similar:

  • I used 2 data store components. 1 for unselected users, 1 for selected users.

  • I’m populating the unselected users data store with a flow, from a server connect action. (Guide from here)

  • On click on a row of user, I’m removing that record from that data store, and adding that record to the other data store.

  • On click of “Add all” and “remove all” I’m just clearing all data from both data store, and adding with a flow a “fresh” list from the sever action to the relevant data store.

3 Likes