Post

Replies

Boosts

Views

Activity

Reply to Is SwiftUI Picker not compatible with a Bindable property?
Sorry, forgot to include the view code: import SwiftUI import CommonUI import SwiftData struct ChoreView: View { @Bindable var chore: Chore @Environment(\.modelContext) private var context @Query private var familyMembers: [FamilyMember] var body: some View { Card { Form { Section("Name") { TextField("Name", text: $chore.name) } Section("Frequency") { Picker(selection: $chore.choreFrequency, label: EmptyView()) { ForEach(ChoreFrequency.allCases) { frequency in Text(frequency.rawValue.localized).tag(frequency.rawValue) } } } } .frame(maxHeight: 400) .padding(-6) } } }
Sep ’23