Sometimes menus have lots of options. This can pose a problem with regard to the height of the menu. Instead of having really long menus displayed, you can place a maximum height on the menu and have it scroll vertically.
Menu scrolling options
How to do it...
Let's say that you need to render a menu with more options than can reasonably be rendered at once on the screen. Also, one of the menu items can be in a selected state. Here's some code that shows how to deal with this situation:
import React, { Fragment, useState } from 'react';
import { makeStyles } from '@material-ui/styles';
import IconButton from '@material-ui/core/IconButton';
import Menu from '@material-ui/core/Menu&apos...