Add method to indicate an event handler should enforce value consistency
See original GitHub issueIn other words, a way to tell Blazor that a given event handler is part of a two-way binding even if you’re not using @bind
.
It would probably look like this:
<input value="@MyValue" @onchange="MyHandler" @onchange:enforceConsistency />
… or maybe @onchange:sync
or @onchange:twoWay
. The implementation is simply to emit a builder.SetUpdatesAttributeName
call for whatever is the “value” attribute for this element type (e.g., on <input type=checkbox>
it would call builder.SetUpdatesAttributeName("checked");
).
For more details about the scenario and justification for this design, see https://github.com/aspnet/AspNetCore/issues/17099#issuecomment-556825048
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:8 (3 by maintainers)
Top Results From Across the Web
EventTarget: addEventListener() method - Web APIs | MDN
An object that specifies characteristics about the event listener. The available options are: ... A boolean value indicating whether events of ...
Read more >Commanded.Event.Handler — Commanded v1.4.2
Consistency. For each event handler you can define its consistency, as one of either :strong or :eventual . This setting is used when...
Read more >Domain events: Design and implementation
Domain events to enforce consistency between multiple aggregates within the ... Handle domain events (within the current process) that will ...
Read more >Event Handlers
1 Introduction Event handlers define microflows that handle certain events related to the entity. Depending on the chosen moment and type, ...
Read more >Understanding events and event handlers in C# - ...
To understand event handlers, you need to understand delegates. In C#, you can think of a delegate as a pointer (or a reference)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looking forward to this one!
I’m looking for a workaround. This one appears to work though there’s some magic in there.