Skip to content

Commit

Permalink
🔥 Autocomplete: remove disablePortal prop (#3603)
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvernes authored Aug 28, 2024
1 parent e4084bd commit c084f0c
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,6 @@ export type AutocompleteProps<T> = {
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
*/
Expand Down Expand Up @@ -343,7 +339,6 @@ function AutocompleteInner<T>(
itemCompare,
allowSelectAll,
initialSelectedOptions: _initialSelectedOptions = [],
disablePortal,
optionDisabled = defaultOptionDisabled,
optionsFilter,
autoWidth,
Expand Down Expand Up @@ -376,12 +371,6 @@ function AutocompleteInner<T>(
: _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)
Expand Down

0 comments on commit c084f0c

Please sign in to comment.