In case anyone else having a similar problem. Using following with NavigationStack solved the problem for me. As explained in these documents,
https://developer.apple.com/documentation/swiftui/navigationlink
https://developer.apple.com/documentation/swiftui/migrating-to-new-navigation-types
NavigationLink {
FolderDetail(id: workFolder.id)
} label: {
Label("Work Folder", systemImage: "folder")
}
Post
Replies
Boosts
Views
Activity
As explained in these documents, using navigationStack with following NavigationLink usage is solved problem for me.
https://developer.apple.com/documentation/swiftui/navigationlink
https://developer.apple.com/documentation/swiftui/migrating-to-new-navigation-types
NavigationLink {
FolderDetail(id: workFolder.id)
} label: {
Label("Work Folder", systemImage: "folder")
}