You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While, as presented, this is a fairly pathological example, it's simply meant to demonstrate the desire of having one component's interactive update affect the current value of the other component, and vice-versa. However, while this works when changing the first component's value interactively (i.e. resulting in Value1Changed running and updating _value2 programmatically, in turn causing the UI to update as expected), once you switch to the other component and interactively change the value, the bindings are broken:
Is this expected? Ultimately, we have a workaround solution, but I am curious if I'm just missing the expected pattern to accomplish this. Note that calling StateHasChanged directly in the callback handler does not affect the behavior.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Consider the following scenario where the
MyComponent
component allows interactive changing of a double value:While, as presented, this is a fairly pathological example, it's simply meant to demonstrate the desire of having one component's interactive update affect the current value of the other component, and vice-versa. However, while this works when changing the first component's value interactively (i.e. resulting in
Value1Changed
running and updating_value2
programmatically, in turn causing the UI to update as expected), once you switch to the other component and interactively change the value, the bindings are broken:Is this expected? Ultimately, we have a workaround solution, but I am curious if I'm just missing the expected pattern to accomplish this. Note that calling
StateHasChanged
directly in the callback handler does not affect the behavior.Beta Was this translation helpful? Give feedback.
All reactions