Home > Software engineering >  Hide Material-UI Autocomplete popup until text is typed
Hide Material-UI Autocomplete popup until text is typed

Time:09-30

I have a working Material-UI Autocomplete implemented, however currently when you click to select an item it displays a clickable dropdown list of all items in addition to the text search.

I would like it so no dropdown options are shown until something is typed first.

<Autocomplete
  id="combo-box"
  options={listofitems}
  value={itemid}
  onChange={viewitemlist}
  renderInput={(params) => <TextField {...params}
    label="Item Id"
    variant="outlined" />}
/>

CodePudding user response:

You can control the Codesandbox Demo

  • Related