From 26e5dfc26bb544361fad9df27623816299b76518 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 31 Jan 2023 03:54:53 -0600 Subject: [PATCH] Fix code example --- aspnetcore/blazor/components/data-binding.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/components/data-binding.md b/aspnetcore/blazor/components/data-binding.md index 993151f37dd0..58422126c0a4 100644 --- a/aspnetcore/blazor/components/data-binding.md +++ b/aspnetcore/blazor/components/data-binding.md @@ -193,7 +193,7 @@ Two-way data binding isn't possible to implement with an event handler. Use `@bi { var newValue = args.Value?.ToString() ?? string.Empty; - inputValue = newValue.Length > 4 ? "Long!" : inputValue = newValue; + inputValue = newValue.Length > 4 ? "Long!" : newValue; } } ``` @@ -220,7 +220,7 @@ The reason for this behavior is that Blazor isn't aware that your code intends t { var newValue = value ?? string.Empty; - inputValue = newValue.Length > 4 ? "Long!" : inputValue = newValue; + inputValue = newValue.Length > 4 ? "Long!" : newValue; } } ```