Aspnetcore: Binding on change

Created on 2 Apr 2018  路  2Comments  路  Source: dotnet/aspnetcore

It looks like two-way binding of value changes for input elements is performed onchange in 0.1.0. I wonder if it might be possible to change that to bind oninput (or at least provide an option to do so). Vue.js works this way and I find it much more responsive to user input. I.e., bound values and components immediately update as the user types.

area-blazor

Most helpful comment

Thanks for the suggestion! We're in the process of changing the bind syntax to a cleaner one that will make it very easy to specify what event you want to respond to.

All 2 comments

I agree with this. It's not very responsive otherwise if it just changes when the input loses focus.

I think the onchange event is similar to when you add the .lazy modifier in Vue.
https://vuejs.org/v2/guide/forms.html#lazy

Thanks for the suggestion! We're in the process of changing the bind syntax to a cleaner one that will make it very easy to specify what event you want to respond to.

Was this page helpful?
0 / 5 - 0 ratings