Closed MattKersey closed 4 years ago
Seems as though this is an issue with ForEach and List, which take a constant number of elements. There is an option in the ForEach loop called .onDelete that allows you to bypass this. A possible solution would be to create a single view that has the ForEach loop for every other view, but what it shows is controlled by a set of variables (eg, you could have a bool that specifies upcoming appointments vs all, a variable that specifies what kind of element to display, one that takes an integer id and only displays that single item, etc)
Changed design so that there is a single ForEach loop (in HomePage). Now it works.
App encounters fatal error when all appointments have been deleted