From 83608baf2f7eca2d47d71eeb9d2f7eb167c45d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 22 Apr 2020 16:18:22 +0200 Subject: [PATCH] Select: Fixed z-index issue (#23786) --- packages/grafana-ui/src/components/Select/SelectBase.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/grafana-ui/src/components/Select/SelectBase.tsx b/packages/grafana-ui/src/components/Select/SelectBase.tsx index ccceedeac9a..3bd44464b0f 100644 --- a/packages/grafana-ui/src/components/Select/SelectBase.tsx +++ b/packages/grafana-ui/src/components/Select/SelectBase.tsx @@ -321,6 +321,9 @@ export function SelectBase({ }} styles={{ ...resetSelectStyles(), + menuPortal: () => ({ + zIndex: theme.zIndex.dropdown, + }), //These are required for the menu positioning to function menu: ({ top, bottom, width, position }: any) => ({ top, @@ -328,12 +331,10 @@ export function SelectBase({ width, position, marginBottom: !!bottom ? '10px' : '0', - zIndex: 9999, + zIndex: theme.zIndex.dropdown, }), container: () => ({ position: 'relative', - // This puts the menu above Inputs (z-index: 1) - zIndex: theme.zIndex.dropdown, width: width ? `${8 * width}px` : '100%', }), }}