Rerun a FutureViewModel when a reactive value has changed #1047
Unanswered
FickleLife
asked this question in
Q&A
Replies: 2 comments
-
Further to this, how would you initialise/refresh data from a single future in a MultipleFutureViewModel ? If you run |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey, You are correct that you simply have to call initialise again. You can do this by creating a setter for the value you want to react to, and only set the value through the setter function. When the value changes you can call initialise. In terms of re-running a single future in multi future, that's not a supported functionality at the moment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my FutureViewModel, I have
What I would like to do is listen for the change in
nodeIdSelected
and rerun myfutureToRun()
function in my FutureViewModel to get data relating to the new ID. At the moment, the UI updates fine with the ID itself, so I know the value is updating in the view, but it is not updated in the view model.Any clues on how to implement? Thanks
EDIT:
In the old implementation of reactive data, this code would accomplish it but this doesn't work anymore
Beta Was this translation helpful? Give feedback.
All reactions