Following on to mrlife's question, passing callback methods to components is perfectly legal in Blazor. Is this supported when calling a component from a View? The use case is a modal dialog with a Save and Cancel button. When clicked, the corresponding callback method fires back in the Model.
<component type="typeof(ZipCodeModal)" render-mode="Serverprerendered" param-Save="@Model.Save" param-Cancel="@Model.Cancel" />
which, of course does not work.
A) Is it possible to pass a method parameter?
B) If it is, what is the correct declarations and syntax?
TIA.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: fcac856a-7cdc-41fb-b7ea-7c5583916019
Version Independent ID: b6f9f287-407a-6036-10b0-4bc13cfade17
Following on to mrlife's question, passing callback methods to components is perfectly legal in Blazor. Is this supported when calling a component from a View? The use case is a modal dialog with a Save and Cancel button. When clicked, the corresponding callback method fires back in the Model. <component type="typeof(ZipCodeModal)" render-mode="Serverprerendered" param-Save="@Model.Save" param-Cancel="@Model.Cancel" /> which, of course does not work.
A) Is it possible to pass a method parameter? B) If it is, what is the correct declarations and syntax? TIA.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.