I want to do something like:
<td contenteditable=true @onblur(async (txt) => { ... })>
but currently it seems only @onchange
is supported, and doesn't actually fire when contenteditable
content is changed. I suppose the method would be to have a JS handler that calls the C# handler, but I don't know if communication can go this way. Is the best option now just to have a button that has an onclick
handler of 'save to DB'? Or is there a better option available?
Felt the need to build a cheatsheet of available events in Blazor....Seems relevant to leave here as onblur is added.
onfocus
onblur
onfocusin
onfocusout
onmouseover
onmouseout
onmousemove
onmousedown
onmouseup
onclick
ondblclick
oncontextmenu
https://github.com/aspnet/Blazor/blob/master/test/testapps/BasicTestApp/MouseEventComponent.cshtml
onwheel
onmousewheel
ondrag
ondragend
ondragenter
ondragleave
ondragover
ondragstart
ondrop
onkeydown
onkeyup
onkeypress
https://github.com/aspnet/Blazor/blob/master/test/testapps/BasicTestApp/KeyPressEventComponent.cshtml
oninput
oninvalid
onreset
onselect
onselectstart
onselectionchange
onsubmit
onchange UIChangeEventArgs
oncopy
oncut
onpaste
onbeforecopy UIEventArgs
onbeforecut
onbeforepaste
ontouchcancel
ontouchend
ontouchmove
ontouchstart
ontouchenter
ontouchleave
https://github.com/aspnet/Blazor/blob/master/test/testapps/BasicTestApp/TouchEventComponent.cshtml
gotpointercapture
lostpointercapture
pointercancel
pointerdown
pointerenter
pointerleave
pointermove
pointerout
pointerover
pointerup
oncanplay
oncanplaythrough
oncuechange
ondurationchange
onemptied
onpause
onplay
onplaying
onratechange
onseeked
onseeking
onstalled
onstop
onsuspend
ontimeupdate
onvolumechange
onwaiting
onloadstart
ontimeout
onabort
onload
onloadend
onprogress
onerror (UIErrorEventArgs)
onactivate
onbeforeactivate
onbeforedeactivate
ondeactivate
onended
onfullscreenchange
onfullscreenerror
onloadeddata
onloadedmetadata
onpointerlockchange
onpointerlockerror
onreadystatechange
onscroll
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With