Hi Experts,
Could you please help.
Issue at high level: After Editing a View contains a Table entries, saved and hit back button to display View, Table entries are duplicated or displaying previous and current entries together.
Here is my Issue in detailed.
-
List view display, clicking on any row, would navigate to DisplayView of a record. I am displaying a table in DisplayView. DisplayView contains "row" as parameter, and it must be initialized in "init" method, where I use row.key and fetch another table (say ColorTab) using Color.Key.
-
DisplayView contains "NavigationView", with Edit button. it displays fetched Colors. example Red and Green. when user click on Edit, it takes to EditPage. user can remove / add colors. Once user made changes, saved and hit back button. Table entries are duplicated or showing previous and current entries.
Options tried,
a) init method is only triggering 1st time, not triggering when back button clicked, I failed to use FetchRequest outside of init method, I tried on OnAppear too. i didn't trigger.
b) Failed to use FetchRequest inside of var Body too.
c) tried using viewContext.refreshAllObjects() .. it is not refreshing the table.
Could you please help if there is solution for the issue.
Thanks, Bhanu