Scrolls to the top on Tab change

Hi,
I am using the SFTab component with multiple tabs with static content for each one of them. But when changing tabs, the page scrolls all the way up, similar to a link to the same page. Is there any way I can avoid this behavior? 

Thank you

1 Reply 1 reply marked as answer

AK Alagumeena Kalaiselvan Syncfusion Team October 12, 2020 01:35 PM UTC

Hi Ernesto, 

Thanks for contacting Syncfusion support! 

We have checked your reported issue “scroll to the Top on Tab change” and by default the scroller position maintained based on the previous /next  scroller position of Tabs. So, we suggest to use content render mode as ContentLoad.Demand to LoadOn property to Tab. We have prepared a sample based on your requirement and refer the below code that. 

<SfTab Height="100px" LoadOn="ContentLoad.Demand"> 
    <TabItems> 
        <TabItem Content="Twitter is an online social networking service that enables users to send and read short 140-charactermessages called tweets.Registered users can read and post tweets, but those who are unregistered can only readthem.Users access Twitter through the website interface, SMS or mobile device app Twitter Inc. is based in SanFrancisco and has more than 25 offices around the world.Twitter was created in March 2006 by Jack Dorsey, Evan Williams, Biz Stone, and Noah Glass and launched in July 2006. The service rapidly gained worldwide popularity, with more than 100 million users posting 340 million tweets a day in 2012.The service also handled 1.6 billionsearch queries per day."> 
            <ChildContent> 
                <TabHeader Text="Twitter"></TabHeader> 
            </ChildContent> 
        </TabItem> 
        ... 
    </TabItems> 
</SfTab> 

Also you can get this sample using the below link. 

Please get back to us, if you need further assistance. 

Regards 
Alagumeena.K 


Marked as answer
Loader.
Up arrow icon