This can be done with the selections api in Hot Chocolate 14.
Here is a youtube episode that shows how it works. https://youtu.be/XZVpimb6sKg