Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How make material UI Tab component auto Scrollable in react

I am using material design UI react components for frontend in react , I am getting issue with the tabs , I want that when click on any of the mention tab the page automatically scroll bit down , right now when i click that tab page does not scrolls

I tried with react scroll module but it does not give the result , instead it throws me to the end of page ,

demo example : https://codesandbox.io/s/yko6x8r0wz

When Click on PageOne within in Tab section , it should scroll down a bit

like image 647
Bilawal Avatar asked Dec 18 '22 17:12

Bilawal


1 Answers

Use the variant= scrollable.

<Tabs
  value={false}
  indicatorColor="primary"
  textColor="primary"
  variant="scrollable"
  scrollButtons="auto"
>

This should work. Thank you.

like image 124
Ankita Avatar answered Feb 01 '23 11:02

Ankita