Open tarasis opened 4 years ago
I added a closure to achieve this 👍 ASNavigationPopToRootButton(onPopToRoot: { ... }) { Text("Test") }
Going ahead will also add a programmatic way via an environment variable, but yet to decide on the best way to provide that api
Thank you, that's works a treat!
Request for either a way to pass an action to ASNavigation*Button, or a way to programmatically trigger the view pop.
Use case:
A list with detail views. Each detail view has a delete button which removes it from the List. Pressing the delete button should trigger the action and then dismiss the view so that the list is displayed.
Current Behaviour:
With a standard List, deleting it from the data source, causes the next detail view to appear.
Hence trying out ASNavigationView.
However there is no option to add an action/closure to ASNavigationPopToRootButton Adding .onTapGesture to ASNavigationPopToRootButton is ignored Adding .onTapGesture to the HStack for the button view overrides the ASNavigationPopToRootButton press functionality.
Trying to use the dynamicNavigationState directly (
@Environment(\.dynamicNavState) var dynamicNavState
) causes a compiler error:'dynamicNavState' is inaccessible due to 'internal' protection level