andrewcbancroft / BlogIdeaList-SwiftUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

List doesn't update if the list order doesn't change

SchwiftyUI opened this issue · comments

Suppose I have 3 ideas like:
ideaTitle 1: A
ideaTitle 2: B
ideaTitle 3: C

If I update the first idea's name to "Aa", the list will still show:
ideaTitle 1: A
ideaTitle 2: B
ideaTitle 3: C

Now, if i update idea 2's title to "aa" so it sorts before idea 1, the list will update to:
ideaTitle 2: aa
ideaTitle 1: Aa
ideaTitle 3: C

My gut says this issue may be an issue in NSManageObject's implementation of ObservedObject. I'd wait until we have a GM to fix. We've seen this issue in multiple places in the beta.

@PaulWoodIII have you had any luck with this since GM? I've been struggling with this same issue.

The key change is noted in the commit message, we devs must call mo.objectWillChange.send()

In the new Xcode Version 11.2 beta (11B41) it's working... finally!

I am unable to reproduce this on Xcode 11.1 + iOS 13.1 on a simulator/device.

Anyone else?

Just tried this on 11.1 with your latest code, and it's working fine now. This appears to be fixed