State based navigation 2 #1434
Unanswered
JaapWijnen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Recently discussed state based navigation in #1398
I have a slightly more complex example however in which a similar problem is popping up. Hoping to get some tips on how to avoid/fix this!
Quick overview of the structure:
AListViewthat contains an array ofA.State. The view itself renders a list ofACardViews card state is contained withinA.StateC.StateBViewBVieworCViewdepending on the state of thecWorkstoggle in ACard.StateCViewregardless of ifACard.State.cWorksis true.Problem: When I press the B button I navigate to the
BViewfor that entity ofA.State, when I press the "Button to C" I run into the issue that navigation seems to re render/trigger and it ends up in theBViewinstead ofCView.Help would be very much appreciated! (I suspect the issue is due to the state in the Route Enum changing when showC is set to true this in turn updates
AList.State.routewhich re triggers the navigation link. Not sure how to work around that however!If anything is unclear please let me know.
Here's some example code:
Beta Was this translation helpful? Give feedback.
All reactions