Work around for Back not being able to set Context Variables? #946
Unanswered
daryllabar
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
-
Background
I have an app where I have a SearchScreen, and if the item isn't found the user can go to a CreateScreen to create the missing item. When the item gets created, I want the created item to be auto-searched for in the SearchScreen by pre-populating the filter text boxes with the newly created item's values. I hate creating global variables when I feel like it really should be a context variable, so I'd like to use context variables for this, but
Back()
doesn't allow for setting context variables. This means I have to use Navigate:Navigate(SearchScreen, None, { filter: item.Name })
. But when I do this, calling back on the SearchScreen takes me back to the CreateScreen.Question
Is this a valid work around for being able to set a context variable with
Back
?This appears to pop the CreateScreen off of the navigation stack and still populate the context variables, but I don't see anywhere documentation that this is legit.
Beta Was this translation helpful? Give feedback.
All reactions