Commit 1554dcee by Tobias Skarhed Committed by GitHub

Cascader: Fix issue where the dropdown wouldn't show (#22045)

* Fix z-index on cascader

* Cleanup

* Remove unused import
parent e9c6c040
...@@ -198,6 +198,10 @@ export class Cascader extends React.PureComponent<CascaderProps, CascaderState> ...@@ -198,6 +198,10 @@ export class Cascader extends React.PureComponent<CascaderProps, CascaderState>
value={rcValue} value={rcValue}
fieldNames={{ label: 'label', value: 'value', children: 'items' }} fieldNames={{ label: 'label', value: 'value', children: 'items' }}
expandIcon={null} expandIcon={null}
// Required, otherwise the portal that the popup is shown in will render under other components
popupClassName={css`
z-index: 9999;
`}
> >
<div className={disableDivFocus}> <div className={disableDivFocus}>
<Input <Input
......
import React, { ChangeEvent } from 'react'; import React, { ChangeEvent } from 'react';
import { mount } from 'enzyme'; import { mount } from 'enzyme';
import { GrafanaThemeType, GrafanaTheme, ThresholdsMode } from '@grafana/data'; import { GrafanaThemeType, ThresholdsMode } from '@grafana/data';
import { ThresholdsEditor, Props, thresholdsWithoutKey } from './ThresholdsEditor'; import { ThresholdsEditor, Props, thresholdsWithoutKey } from './ThresholdsEditor';
import { colors } from '../../utils'; import { colors } from '../../utils';
import { mockThemeContext } from '../../themes/ThemeContext'; import { mockThemeContext } from '../../themes/ThemeContext';
const setup = (propOverrides?: Partial<Props>) => { const setup = (propOverrides?: Partial<Props>) => {
const props: Props = { const props: Props = {
theme: { type: GrafanaThemeType.Dark, isDark: true, isLight: false } as GrafanaTheme,
onChange: jest.fn(), onChange: jest.fn(),
thresholds: { mode: ThresholdsMode.Absolute, steps: [] }, thresholds: { mode: ThresholdsMode.Absolute, steps: [] },
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment