Changing "oneOf" Tabs to be scrollable

Hello,

I have a problem with the oneOf component, that is rendered by MaterialRenderers (MaterialOneOfRenderer). The tabs I want to display exceed 10. All tabs after the first 10 will not be displayed. That’s why I want to change the “Tabs” from Material-UI to be Scrollable instead of fixed. This is usually simple using the variant=“scrollable”. But because the Tabs component is wrapped inside the MaterialOneOfRenderer I am not sure how I can fix this. Can someone help me with that?

Thank you very much.

Best Regards
Philip

Hi @pbarth,

You can specify variant="scrollable" via the Material UI default props theming, see here for the docs. If you wrap JSON Forms with your custom theme, then all Tabs will be rendered as scrollable.

If you only want to apply the scrollable variant if there are more than 10 tab items, then you will need to use a custom renderer.

1 Like