Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save damirstuhec/a140ab8bf0b43385b89a76a96b23d371 to your computer and use it in GitHub Desktop.
Save damirstuhec/a140ab8bf0b43385b89a76a96b23d371 to your computer and use it in GitHub Desktop.
SwiftUI NavigationLink regression bug
@damirstuhec
Copy link
Author

Description of the issue

Setting NavigationLink's selection to nil does not deselect/dismiss/pop the currently presented details view.

EXPECTED

  1. tap item 1
  2. selectedItem=1
  3. tap "Pop"
  4. selectedItem=nil
  5. DetailView gets dismissed

OBSERVED

  1. tap item 1
  2. selectedItem=1
  3. tap "Pop"
  4. selectedItem=nil
  5. selectedItem=1 (reverted)
  6. DetailView is NOT dismissed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment