NavigationBackport icon indicating copy to clipboard operation
NavigationBackport copied to clipboard

Adds NBNavigationLinkViewModifier to allow programmatic triggering of the navigate action.

Open gsp100677 opened this issue 3 years ago • 1 comments

Purpose

In use cases where we would normally like to use the NBNavigationLink, but need to trigger the same navigation action programmatically, based on a changing state variable, instead of with a button press.

E.g. I found this useful for a few cases where there is an HTML web view embedded in app, and I needed to intercept links being tapped, to trigger onward navigation.

gsp100677 avatar Oct 12 '22 14:10 gsp100677

Thanks for this PR @gsp100677! This is a similar request to #21. I've created a PR #23 that should fit this use case, albeit with a different approach than your proposed one.

johnpatrickmorgan avatar Oct 14 '22 22:10 johnpatrickmorgan

Closing as #23 allows this use case albeit in a different manner.

johnpatrickmorgan avatar Oct 21 '22 21:10 johnpatrickmorgan

Ah I see what you've done - thanks! Your PR should work for me just as well!

gsp100677 avatar Nov 09 '22 13:11 gsp100677