Blazor: How to use the onchange event in <select> when using @bind also?

后端 未结 6 1592
暖寄归人
暖寄归人 2021-02-12 17:33

I need to be able to run a function after a selection in made in a is changed. Hence, for most use cases I don't see the need to check when it was updated.

To use @onchange, you can bind it to a function something like this:

public void OnUpdated(ChangeEventArgs e)
{
    var selected = e.Value;
}

提交回复
热议问题