Skip to content

Commit 95409f5

Browse files
authored
Bugfix: QueryField typeahead missing background color (grafana#92216)
Added missing styles to the typeahead menu.
1 parent 9fbfaf0 commit 95409f5

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

packages/grafana-ui/src/components/Typeahead/Typeahead.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class Portal extends PureComponent<React.PropsWithChildren<PortalProps>, {}> {
221221
const { index = 0, origin = 'query', style } = props;
222222
this.node = document.createElement('div');
223223
this.node.setAttribute('style', style);
224-
this.node.classList.add(`slate-typeahead`, `slate-typeahead-${origin}-${index}`);
224+
this.node.classList.add(`slate-typeahead-${origin}-${index}`);
225225
document.body.appendChild(this.node);
226226
}
227227

@@ -244,8 +244,18 @@ class Portal extends PureComponent<React.PropsWithChildren<PortalProps>, {}> {
244244

245245
const getStyles = (theme: GrafanaTheme2) => ({
246246
typeahead: css({
247-
maxHeight: 300,
248-
overflowY: 'auto',
247+
position: 'relative',
248+
zIndex: theme.zIndex.typeahead,
249+
borderRadius: theme.shape.radius.default,
250+
border: `1px solid ${theme.components.panel.borderColor}`,
251+
maxHeight: '66vh',
252+
overflowY: 'scroll',
253+
overflowX: 'hidden',
254+
outline: 'none',
255+
listStyle: 'none',
256+
background: theme.components.panel.background,
257+
color: theme.colors.text.primary,
258+
boxShadow: theme.shadows.z2,
249259

250260
strong: {
251261
color: theme.v1.palette.yellow,

0 commit comments

Comments
 (0)