StuartW
StuartW

Reputation: 51

iOS 16 Beta Issue? - List selection binding parameter is not being updated when items are selected in the list

I have a List with a bound selection field. The list is populated with a ForEach loop (outline code below)

@State private var editMode = EditMode.inactive
@State private var selectedItems = Set<Int>()

List (selection: $selectedItems) {
    ForEach (myObjects.indices, id:\.self) { idx in …….
        Button(…)
    }
}

A toolbar action toggles the list edit status by manipulating the editMode parameter. Visually the list shows rows being selected, however the selectedItems field is never updated.

This works as expected in iOS15.5 - only an issue in iOS16 Betas (up to 3 currently)

I've logged feedback with Apple but thought I'd also post here in case I'm missing something? Thanks

Update: Still a problem with Beta 4

Upvotes: 4

Views: 453

Answers (1)

StuartW
StuartW

Reputation: 51

This issue has been resolved by Apple in iOS 16.1 beta

Upvotes: 1

Related Questions