Call components withinTabItem whitout being shown on the screen

Hi, I have this situation with sfTab component in Blazor 18.4.0.43

In one blazor page I have sfTab with 3 tab Items
In TabItem No. 3 
I am creating components

         Like this

 <TabItem>
                        <ChildContent>
                            <TabHeader Text="Comentarios" IconCss="e-twitter"></TabHeader>
                        </ChildContent>
                        <ContentTemplate>

                           <ComponentData/>


                        </ContentTemplate>
                    </TabItem>

The problem that I have is when I call save button on Tabitem1,
this button call every component and send data to api database.


If I not make click in tabitem3, I get null reference error because sftab content on tab3 not exists.
Only works when after I made clic in tab3 with mouse.

Is there any way to instantiate content inside one tabitem without touch event?

Thanks in advance!

3 Replies 1 reply marked as answer

PN Praveenkumar Narasimhanaidu Syncfusion Team March 3, 2021 05:35 PM UTC

Hi Jose, 
  
Greetings from Syncfusion support..! 
  
By default in Blazor tab control, content of the tab items rendered on selecting the tab item. We suspect that your requirement is to render the content of all tab items on initial load itself instead of rendering the content on tab selection which we can be achieve by setting the ContentLoad.OnInit to the property LoadOn. For more information please refer to the below UG documentation link. 
  
  
Kindly refer the above docs and let us know if this meets your requirement. If we misunderstood your requirement, please share following details to provide prompt solution. 
  • Code snippets you have used
  • Share video demo or image of your requirement.
  
Regards, 
Praveenkumar. 


Marked as answer

JL jose luis barajas March 4, 2021 05:02 AM UTC

Hi

This is what I need

Thanks for your support!


NR Nevitha Ravi Syncfusion Team March 5, 2021 04:35 AM UTC

Hi Jose, 

You are most welcome..! Please get back to us if you need any further assistance. 

Regards, 
Nevitha 


Loader.
Up arrow icon