From c084f0c5e38d1aa06251fb843e9a2533c4d015b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oddbj=C3=B8rn=20=C3=98vernes?= Date: Wed, 28 Aug 2024 14:37:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Autocomplete:=20remove=20disable?= =?UTF-8?q?Portal=20prop=20(#3603)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Autocomplete/Autocomplete.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/eds-core-react/src/components/Autocomplete/Autocomplete.tsx b/packages/eds-core-react/src/components/Autocomplete/Autocomplete.tsx index 03d8954df..cb08e3b46 100644 --- a/packages/eds-core-react/src/components/Autocomplete/Autocomplete.tsx +++ b/packages/eds-core-react/src/components/Autocomplete/Autocomplete.tsx @@ -289,10 +289,6 @@ export type AutocompleteProps = { optionLabel?: (option: T) => string /** Custom option template */ optionComponent?: (option: T, isSelected: boolean) => ReactNode - /** Disable use of react portal for dropdown - * @deprecated Autocomplete now uses the native popover api to render the dropdown. This prop will be removed in a future version - */ - disablePortal?: boolean /** Disable option * @default () => false */ @@ -343,7 +339,6 @@ function AutocompleteInner( itemCompare, allowSelectAll, initialSelectedOptions: _initialSelectedOptions = [], - disablePortal, optionDisabled = defaultOptionDisabled, optionsFilter, autoWidth, @@ -376,12 +371,6 @@ function AutocompleteInner( : _initialSelectedOptions : undefined - if (disablePortal) { - console.warn( - 'Autocomplete "disablePortal" prop has been deprecated. Autocomplete now uses the native popover api', - ) - } - const isControlled = Boolean(selectedOptions) const [inputOptions, setInputOptions] = useState(options) const [_availableItems, setAvailableItems] = useState(inputOptions)