Skip to content

@bind and @onchange on the same element doesn't work #16229

@FredBlondel

Description

@FredBlondel

I've try to set both @Bind and @onchange but onchange is not thrown
Ex:

            @foreach (var todo in todoList)
            {
                <tr>
                    <td><input @bind(todo.Done) type="checkbox" @onchange(a => LastChecked(todo)) /> </td>
                    <td>@todo.Name</td>
                </tr>
            }

Separatly, evething works fine, ie:
<input type="checkbox" @onchange(a => LastChecked(todo)) />

Or

<input @bind(todo.Done) type="checkbox" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions