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 expect string | string[]

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

No response

Current behavior 😯

Should not have to explicitly set the type in autocomplete

Expected behavior 🤔

Upgrading to latest MUI/material version is giving errors on how the autocomplete infers the type. I use to just be able to have <Autocomplete … />

but now i have to put <Autocomplete<ICustom> …/>

Context 🔦

Issue affects entire code. Would need major rework.

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:2
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gnowlandcommented, Dec 6, 2022

Thanks for explaining!! I’m still a bit befuddled by complex TypeScript declarations, glad I could help define the issue for you to fix 😃

1reaction
DaveITplcommented, Dec 2, 2022

useAutocomplete.d.ts export type AutocompleteValue<T, Multiple, DisableClearable, FreeSolo> = Multiple extends true

default property is false

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue #35308 · mui/material-ui - Autocomplete expect string
This bug was introduced by #35275. Since that PR was merged omitting Autocomplete parameter multiple results in TypeScript inferring that the ...
Read more >
how to auto complete string literal in Visual Studio?
1 Answer 1 ... You're right that Visual Studio doesn't support auto completion for string literals. The IntelliSense options may not work as...
Read more >
No suggestions to autocomplete missing properties in Flow by ...
Currently, when you create an empty object {} of an expected type X = {a: string, b: number} , there is no autocompletion...
Read more >
Place Autocomplete | Places API - Google Developers
The Place Autocomplete service is a web service that returns place predictions in response to an HTTP request. The request specifies a textual...
Read more >
Accname-matches-autocomplete - WCAG WG
Accname-matches-autocomplete · Using a string of characters in the (Accessible) Name that matches the string in the corresponding HTML5.2 autocomplete attributes.
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