Skip to content

Commit

Permalink
🐛 fix(Input): Assigning Value does not update the state of the Intern…
Browse files Browse the repository at this point in the history
…alValue (#377)
  • Loading branch information
capdiem authored Apr 11, 2023
1 parent 6e02f76 commit 5b033e5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,6 @@ protected override void OnParametersSet()

protected virtual void OnValueChanged(TValue val)
{
LazyValue = val.TryDeepClone();

// OnInternalValueChange has to invoke manually because
// LazyValue is the getter of InternalValue, LazyValue changes cannot notify the watcher of InternalValue
var isEqual = true;
if (val is IList valList && InternalValue is IList internalValueList)
{
Expand Down Expand Up @@ -308,6 +304,8 @@ protected virtual void OnValueChanged(TValue val)
{
ValueChangedInternally = false;
}

LazyValue = val.TryDeepClone();
}

protected virtual void OnInternalValueChange(TValue val)
Expand Down

0 comments on commit 5b033e5

Please sign in to comment.