Chore: Remove menuShouldPortal deprecation warning (#45211)

* Chore: Remove Select deprecation

* remove unused import

* Update lockfile
This commit is contained in:
Ashley Harrison
2022-02-10 11:46:35 +00:00
committed by GitHub
parent 923b62ecab
commit 947b8b8d3b
2 changed files with 2 additions and 6 deletions

View File

@@ -20,7 +20,6 @@ import { useTheme2 } from '../../themes';
import { getSelectStyles } from './getSelectStyles';
import { cleanValue, findSelectedValue } from './utils';
import { ActionMeta, SelectBaseProps, SelectValue } from './types';
import { deprecationWarning } from '@grafana/data';
interface ExtraValuesIndicatorProps {
maxVisibleValues?: number | undefined;
@@ -119,6 +118,7 @@ export function SelectBase<T>({
maxVisibleValues,
menuPlacement = 'auto',
menuPosition,
// TODO change this to default to true for Grafana 9
menuShouldPortal = false,
noOptionsMessage = 'No options found',
onBlur,
@@ -140,9 +140,6 @@ export function SelectBase<T>({
isValidNewOption,
formatOptionLabel,
}: SelectBaseProps<T>) {
if (menuShouldPortal === false) {
deprecationWarning('SelectBase', 'menuShouldPortal={false}', 'menuShouldPortal={true}');
}
const theme = useTheme2();
const styles = getSelectStyles(theme);

View File

@@ -47,9 +47,8 @@ export interface SelectCommonProps<T> {
menuPlacement?: 'auto' | 'bottom' | 'top';
menuPosition?: 'fixed' | 'absolute';
/**
* @deprecated
* Setting to true will portal the menu to `document.body`.
* This property will soon be removed and portalling will be the default behavior.
* This property will soon default to true and portalling will be the default behavior.
*/
menuShouldPortal?: boolean;
/** The message to display when no options could be found */