From 3fda778e6d5b0dcc80adf5f1bd217024724fd235 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Thu, 10 Feb 2022 12:58:19 +0100 Subject: [PATCH] Chore: Remove `menuShouldPortal` deprecation warning (#45211) (#45221) * Chore: Remove Select deprecation * remove unused import * Update lockfile (cherry picked from commit 947b8b8d3b9ccf2713861cf052a00898571f4e8f) Co-authored-by: Ashley Harrison --- packages/grafana-ui/src/components/Select/SelectBase.tsx | 5 +---- packages/grafana-ui/src/components/Select/types.ts | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/grafana-ui/src/components/Select/SelectBase.tsx b/packages/grafana-ui/src/components/Select/SelectBase.tsx index bcc267afdb0..ea94ccc918d 100644 --- a/packages/grafana-ui/src/components/Select/SelectBase.tsx +++ b/packages/grafana-ui/src/components/Select/SelectBase.tsx @@ -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({ maxVisibleValues, menuPlacement = 'auto', menuPosition, + // TODO change this to default to true for Grafana 9 menuShouldPortal = false, noOptionsMessage = 'No options found', onBlur, @@ -139,9 +139,6 @@ export function SelectBase({ width, isValidNewOption, }: SelectBaseProps) { - if (menuShouldPortal === false) { - deprecationWarning('SelectBase', 'menuShouldPortal={false}', 'menuShouldPortal={true}'); - } const theme = useTheme2(); const styles = getSelectStyles(theme); diff --git a/packages/grafana-ui/src/components/Select/types.ts b/packages/grafana-ui/src/components/Select/types.ts index 989d293bfdd..c9f94f5bcba 100644 --- a/packages/grafana-ui/src/components/Select/types.ts +++ b/packages/grafana-ui/src/components/Select/types.ts @@ -46,9 +46,8 @@ export interface SelectCommonProps { 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 */