mercredi 27 janvier 2021

SwiftUI Checkbox Is Not Displaying The Check Mark When Clicked

I generate a dynamic checkbox list

struct ClaimStatusSearchView: View {

@ObservedObject var myObject = myObject ()

var body: some View {
    VStack(alignment:.leading, spacing:20) {
        Text("My Check Box List")
            .font(.system(size: 16))
            .bold()
            .foregroundColor(.black)
        ForEach(myObject.checkBoxList, id:\.id) { item in
            CheckboxField(
                id: item.checkboxDesc ,
                label: item.checkboxDesc ,
                callback: self.checkboxSelected
            )
        }
    }.padding(20)
    
}

But when I click on the checkbox, the checkmark is not displayed.

enter image description here




Aucun commentaire:

Enregistrer un commentaire