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
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.300-preview2-008533\
Repro
@page "/"
<input value="@Text" onchange="@onTextChange" />
<div>Currently text: @Text</div>
<div onclick="@onButtonClick">SET TEXT TO NULL</div>
@{
Console.WriteLine($"Render with: '{Text ?? "NULL"}'");
}
@functions
{
public string Text { get; set; }
protected void onTextChange(UIChangeEventArgs e)
{
Text = (string)e.Value;
}
protected void onButtonClick()
{
Text = null;
}
}
When i type some text to input (click outside for call "onchange"). And then i click to "SET TEXT TO NULL". In console i see Render with: 'NULL' but input keep last value.
It fail same if i use <input bind="@Text" /> (and remove onTextChange).
Excepted behavior
Reset input text. (same like for <div>@Text</div>).
…rowserRenderer.ts. Fixes #659 and #703
* Stop the value<-->checked conversions for checkboxes. Just use native 'checked' property. Fixes #703
* Properly handle removal of 'checked' and 'value' attributes
* E2E coverage for removing 'value'
…rowserRenderer.ts. Fixes #659 and #703
* Stop the value<-->checked conversions for checkboxes. Just use native 'checked' property. Fixes #703
* Properly handle removal of 'checked' and 'value' attributes
* E2E coverage for removing 'value'
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.300-preview2-008533\
Repro
When i type some text to input (click outside for call "onchange"). And then i click to "SET TEXT TO NULL". In console i see
Render with: 'NULL'
but input keep last value.It fail same if i use
<input bind="@Text" />
(and remove onTextChange).Excepted behavior
Reset input text. (same like for
<div>@Text</div>
).Workaround
<input value="@(Text ?? string.Empty)" onchange="@onTextChange" />
The text was updated successfully, but these errors were encountered: