question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Autocomplete] Types force multiple to be set

See original GitHub issue

Prior to 4.9.0 (lab-alpha-40) /**

  • If true, value must be an array and the menu will support multiple selections. */ multiple?: boolean;

After 4.9.0" /**

  • If true, value must be an array and the menu will support multiple selections. */ multiple?: true;

I think it is a bug. Interface cannot have constants.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Expected Behavior 🤔

Steps to Reproduce 🕹

Steps:

Context 🔦

Your Environment 🌎

Tech Version
Material-UI v4.?.?
React
Browser
TypeScript
etc.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (15 by maintainers)

github_iconTop GitHub Comments

4reactions
DevMammadovcommented, Aug 15, 2020

i want costumize Autocomplate like this:

import React, { FC } from "react";
import { useStyles } from "./autocomplate.style";
import { useTranslator } from "localization";
import { Autocomplete, AutocompleteProps } from "@material-ui/lab/";
import { TextField } from "..";

export interface IAutoComplate {}

export const AutoComplate: FC<IAutoComplate & AutocompleteProps> = () => {
  const lang = useTranslator();
  const classes = useStyles();

  return (
    <Autocomplete
          id="combo-box-demo"
          options={[]}
          getOptionLabel={(option) => option}
          style={{ width: 300 }}
          renderInput={(params) => <TextField {...params} label="Combo box" variant="outlined" />}
    />
  );
};

but it gives me an error like this: Generic type ‘AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>’ requires 4 type argument(s) what can i do in this situation ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Autocomplete] Types force multiple to be set #19354 - GitHub
I think it is a bug. Interface cannot have constants. The issue is present in the latest release. I have searched the issues...
Read more >
How to use Material-UI Autocomplete component to select ...
You want to enable multi selection, and allow the user to enter any arbitrary value in the textbox. Therefore you can use the...
Read more >
autofill - CSS: Cascading Style Sheets - MDN Web Docs
The :autofill CSS pseudo-class matches when an <input> element has its value autofilled by the browser. The class stops matching if the user ......
Read more >
Place Autocomplete Restricted to Multiple Countries
This example uses the Place Autocomplete widget to provide a type-ahead search box. ... Set initial restriction to the greater list of countries....
Read more >
Use AutoComplete when entering formulas - Microsoft Support
Turn on AutoComplete. On the Excel menu, click Preferences. Under Formulas and Lists, click AutoComplete. Select the Show AutoComplete options for functions ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found