i want to implement a Blator-Component within a EventCallBack in a razor-Page (*.cshtml). Currently the component is shown and i can click the buttons inside the component with the correct reaction of the component.
Now i want to get the events of the component and call some functions in the razor-file. But this does not work.
My Blazor-Component has a EventCallBack like this:
[Parameter]public EventCallback<bool> OnValidate { get; set; }and is triggert like this:
OnValidate.InvokeAsync( false );My razor-page implement the component like this:
<component type="typeof(MyBlazorComponent)" render-mode="ServerPrerendered" param-Width=200 param-Height=50 param-OnValidate="@(EventCallback.Factory.Create<bool>(this, HandleAction))" />and the called function is
void HandleAction( bool actionResult ){ t = actionResult;}I hoped that the function HandleAction is called when the EventCallBack is invoked but it does not.