Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Limit menu's height

dominik-zeglen1ee0c253d37a
diff --git a/saleor/static/dashboard-next/components/LanguageSwitch/LanguageSwitch.tsx b/saleor/static/dashboard-next/components/LanguageSwitch/LanguageSwitch.tsx
index 1305816546..ba6efae636 100644
--- a/saleor/static/dashboard-next/components/LanguageSwitch/LanguageSwitch.tsx
+++ b/saleor/static/dashboard-next/components/LanguageSwitch/LanguageSwitch.tsx
@@ -46,6 +46,10 @@ const styles = (theme: Theme) =>
menuItem: {
textAlign: "justify"
},
+ menuPaper: {
+ maxHeight: `calc(100vh - ${theme.spacing.unit * 2}px)`,
+ overflow: "scroll"
+ },
popover: {
zIndex: 1
},
@@ -92,7 +96,7 @@ const LanguageSwitch = withStyles(styles, { name: "LanguageSwitch" })(
placement === "bottom" ? "right top" : "right bottom"
}}
>
- <Paper>
+ <Paper className={classes.menuPaper}>
<ClickAwayListener
onClickAway={() => setExpandedState(false)}
mouseEvent="onClick"