Given this slighty modified Counter.razor component (from the default blazor server side template)
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
<input value="@currentCount" @onchange="chg" />
@code {
int currentCount = 0;
void IncrementCount()
{
currentCount++;
}
void chg(ChangeEventArgs e)
{
currentCount = 999;
}
}
I would expect that every time the input is changed (by user input), the value goes back to 999, but this doesn't happen.... It works for just one change, after that... you can keep changing the input entering any number, and it doesn't change anymore.
Regards!
Given this slighty modified Counter.razor component (from the default blazor server side template)
I would expect that every time the input is changed (by user input), the value goes back to 999, but this doesn't happen.... It works for just one change, after that... you can keep changing the input entering any number, and it doesn't change anymore.
Regards!