Wrapped Components
Hi,
i wrapped all my syncfusion blazor components with my own components. In my pages i am only using mine, with syncfusion components inside.
I get an exception after loading: "Error: Could not find 'sfBlazor' in 'window'."
If i add a control directly on the page (e.g next to my wrapped component) everything works fine.
It seems that the js assets only get lazy loaded when the components are not wrapped by my own components.
Is there a way to trigger the loading of the js assets manually?
SIGN IN To post a reply.
5 Replies
UN
Unknown
March 27, 2020 10:33 AM UTC
I checked again and i see that the assets get loaded..
UN
Unknown
March 27, 2020 10:48 AM UTC
I was able to solve it for now with placing a none visible item in the main
<div class="main">
<div class="content px-4">
<CascadingValue Name="BaseTranslations" Value="@_translations">
@Body
</CascadingValue>
<div style="display:none;">
<SfComboBox TValue="string" TItem="string" Placeholder="Select a game"></SfComboBox>
</div>
</div>
</div>
SM
Saranya Murugasamy
Syncfusion Team
March 31, 2020 03:34 PM UTC
Hi Nils Czernig,
Greetings from Syncfusion.
We have created the Blazor server app with custom component along with Syncfusion components based on your requirements. We didn’t faced any issue by setting the value “display: none” for div element as you have mentioned in your code example. Please find the sample in below link.
Could you please check the above sample link and share the below detail for us.
1. Share the replicate procedure or if possible, please reproduce the issue in this sample and revert us.
It will be helpful to focus on specific area and assist you at the earliest.
Regards,
Saranya M
UN
Unknown
March 31, 2020 03:37 PM UTC
I think you missunderstood me. The control with display none solved the problem.
My problem occurs if i use multiple syncfusion controls on a page, where every syncfusion control is wrapped within my custom control.
Eg:
Page:
<customcontrol1>
</customcontrol1>
Customcontrol 1 could be a SFDropDown. Because the Syncfusion control is not added to the root of the page, the window.syncfusion variable is not set. The problem is solved by adding a syncfusion control at the top level with display:none..
SM
Saranya Murugasamy
Syncfusion Team
April 1, 2020 06:34 AM UTC
Hi Nils Czernig,
Thanks for your update.
We are glad to hear that your reported issue has been resolved. Please get back to us if you need any further assistance on this.
Regards,
Saranya M
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
UN Unknown
- Mar 27, 2020 10:24 AM UTC
- Apr 1, 2020 06:34 AM UTC