Adaptive Autocomplete

Adaptiveness

  • Opens a dialog on the extra-small breakpoint (customizable using the dialogBreakpoint prop)

Variations

Limitations

  • The dialog input is not auto focused in dev mode when <StrictMode> is used: MUI issue

API

MUI Autocomplete API with the following changes:

  • slots & slotProps have dialog & dialogAutocomplete members
  • slots.popper is set internally when inside the dialog
  • AutocompleteRenderInputParams has autoFocus & slotProps members

dialogBreakpoint

Breakpoint or screen width in px and below at which a dialog will open. This behavior can be enabled/disabled always by setting it to true/false

  • Type: "xs" | "sm" | "md" | "lg" | number | boolean
  • Default: xs
  • Component Source 
  • Doc Source adaptiveAutocomplete.mdx
  • MUI Autocomplete