Closed
Description
I thought the following would work:
<input @bind="@someText" @bind:event="oninput" />
... but it does not (it only updates on change, not on input).
To update on each keystroke, you have to use the following less obvious syntax instead:
<input @bind-value="@someText" @bind-value:event="oninput" />
Also I think we should dropon
from these event names, as it feels less obvious than @bind:event="input"
. The on
prefix is a bit of a historical oddity in HTML/JS generally, e.g., more recent APIs like addEventListener
don't use on
prefixes for event types.