SwiftData multiple selection from sidebar

Hello,

I am developing a swift data macOS reminders app. I need the user to be able to select multiple items from the sidebar and record a variable of which ones are selected. However, I also want a variable that will track the first one of the selection selected so it can be shown in the detail view.

I would like this to be similar to the Apple reminders app, where u can select multiple to delete, but only one list is shown in the detail view.

how do I do this?

thanks so much, Dev_Pro

SwiftData multiple selection from sidebar
 
 
Q