Skip to content

ServerSide Blazor Input onchange issue Core 3.0 #17099

@chrdlx

Description

@chrdlx

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!

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions