Skip to content

Commit

Permalink
Fix: weight input does not stay updated
Browse files Browse the repository at this point in the history
When deselecting the input during weight selection, it would go back to the original value.  We need to let blazor know state has changed
  • Loading branch information
LiamMorrow committed Dec 3, 2024
1 parent f99071d commit 08ddb20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions LiftLog.Ui/Shared/Presentation/WeightDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@
if (string.IsNullOrWhiteSpace(value) && AllowNull)
{
EditorWeight = null;
StateHasChanged();
return;
}

if (decimal.TryParse(value, out var result))
{
EditorWeight = result;
StateHasChanged();
}
}
}

0 comments on commit 08ddb20

Please sign in to comment.