Post

Replies

Boosts

Views

Activity

Reply to SwiftUI List with Selection is Highlighting even in non-edit mode
** @State private var multiSelection = Set(),** which allows for multiple selections in the List. multiSelection tracks selection state even when you navigate away, items remain selected when you return. so the fix is basically multiSelection.removeAll() .onAppear { multiSelection.removeAll() // Clear selection when the view appears }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’24