From 88d3dba97a29f7188c3bda8be965fb18f97f4b4d Mon Sep 17 00:00:00 2001 From: Michal Klobukowski Date: Wed, 5 Dec 2018 21:18:52 +0100 Subject: [PATCH] Improve suggestions box style so it stays in a viewport Feature #14393 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- src/components/autocomplete/autocomplete.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/autocomplete/autocomplete.tsx b/src/components/autocomplete/autocomplete.tsx index 7da4ba4a..13d5f79a 100644 --- a/src/components/autocomplete/autocomplete.tsx +++ b/src/components/autocomplete/autocomplete.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { Input as MuiInput, Chip as MuiChip, Popper as MuiPopper, Paper, FormControl, InputLabel, StyleRulesCallback, withStyles, RootRef, ListItemText, ListItem, List, FormHelperText } from '@material-ui/core'; +import { Input as MuiInput, Chip as MuiChip, Popper as MuiPopper, Paper as MuiPaper, FormControl, InputLabel, StyleRulesCallback, withStyles, RootRef, ListItemText, ListItem, List, FormHelperText } from '@material-ui/core'; import { PopperProps } from '@material-ui/core/Popper'; import { WithStyles } from '@material-ui/core/styles'; import { noop } from 'lodash'; @@ -199,3 +199,10 @@ const inputStyles: StyleRulesCallback = () => ({ }); const Input = withStyles(inputStyles)(MuiInput); + +const Paper = withStyles({ + root: { + maxHeight: '80vh', + overflowY: 'auto', + } +})(MuiPaper); -- 2.30.2