Open abdollahkahne opened 2 years ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Apparently this is also the case with Component Tag Helper in razor page/view according to following paragraph. So here we can use the same guideline (Prerendering in WebAssembly).
The Component Tag Helper doesn't support receiving a RenderFragment delegate for child content (for example, param-ChildContent="..."). We recommend creating a Razor component (.razor) that references the component you want to render with the child content you want to pass and then invoke the Razor component from the page or view.
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Is there an existing issue for this?
Describe the bug
I am using Blazor Web Assembly in .Net 6 and I want to Render a component from JavaScript. The Component requires a ChildContent (RenderFragment class in .Net) but when I try to pass it using the following expression it gives me an error. I tried both string and lambda function but it give me error in both case.
The question I have here is how I can set Render Fragment Parameter from JavaScript?
Related #Issue cc: @guardrex https://github.com/dotnet/AspNetCore.Docs/issues/24648
Expected Behavior
No response
Steps To Reproduce
1- Create A Blazor WAsm using default template 2- Create a simple component like below as Dialog.razor
3- Change Index.html file to load component from JavaScript as below:
4- Enable Rendering components from JavaScript by adding the following line to Startup/Program
builder.RootComponents.RegisterForJavaScript<Dialog>("dialog");
Exceptions (if any)
No response
.NET Version
6.0.101
Anything else?