I've been experimenting with SwiftUI, in particular with a Multiplatform app.
My app is laid up like the Fruta sample app, but my list is passing an item as a binding to a detail view which can edit the selected item.
The app works fine enough, but I noticed something that I feel might be a bug.
After the detail view is accessed, when the source of truth (a simple array of items in my case) is updated the List is not updated.
The actual array from within the view is correctly updated, I verified this by adding a label counting the items on top of my list and it goes up every time I add an item, but the list doesn't show the new items.
The list only starts updating again if I navigate away and back to the list using the sidebar.
Oddly enough modifying the items does reflect that change in the List view, but adding new items doesn't.
What's even more bizarre is that it just works on iPadOS.
I have uploaded my project to Droplr so maybe you guys can check it out and let me know if I'm missing something?
https:// d.pr/ f/ Z67vax
My app is laid up like the Fruta sample app, but my list is passing an item as a binding to a detail view which can edit the selected item.
The app works fine enough, but I noticed something that I feel might be a bug.
After the detail view is accessed, when the source of truth (a simple array of items in my case) is updated the List is not updated.
The actual array from within the view is correctly updated, I verified this by adding a label counting the items on top of my list and it goes up every time I add an item, but the list doesn't show the new items.
The list only starts updating again if I navigate away and back to the list using the sidebar.
Oddly enough modifying the items does reflect that change in the List view, but adding new items doesn't.
What's even more bizarre is that it just works on iPadOS.
I have uploaded my project to Droplr so maybe you guys can check it out and let me know if I'm missing something?
https:// d.pr/ f/ Z67vax