Need defaultTab functionality

How can i render second tab as default when component render?


1 Reply

SK Satheesh Kumar Balasubramanian Syncfusion Team January 25, 2022 01:12 PM UTC

Hi Anand, 
  
You can use selectedItem property to render second tab as default when component render. 
  
  
index.js:   
          <TabComponent 
            selectedItem={1} 
            heightAdjustMode="Auto" 
            id="defaultTab" 
          > 
            <TabItemsDirective> 
              <TabItemDirective header={headertext[0]} content={tabContent1} /> 
  
              <TabItemDirective header={headertext[1]} content={tabContent2} /> 
  
              <TabItemDirective header={headertext[2]} content={tabContent3} /> 
            </TabItemsDirective> 
          </TabComponent> 
  
Kindly try the above sample and let us know if this meets your requirement. 
  
Regards, 
Satheesh Kumar B 


Loader.
Up arrow icon