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] candidate.toLowerCase is not a function

See original GitHub issue
  • 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 😯

candidate.toLowerCase is not a function

image

Expected Behavior 🤔

It should work without throwing a runtime error

Steps to Reproduce 🕹

https://codesandbox.io/s/material-ui-autocomplete-r3okv?file=/src/App.tsx

Steps:

  1. Click the link above

Context 🔦

Just trying to get the autocomplete working with an array of objects. And it’s throwing a runtime error, which means that either types are wrong or there is actually a bug in the implementation.

Your Environment 🌎

All the details of the environment and versions are in the Sandbox mentioned above.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marianayapcommented, Nov 30, 2020

@oliviertassinari Hello! I’ll like to work on this issue

1reaction
temurihcommented, Nov 16, 2020

@oliviertassinari Should have just said, use getOptionLabel if you are passing an object.

Read more comments on GitHub >

github_iconTop Results From Across the Web

candidate.toLowerCase is not a function. (In ... - Stack Overflow
toLowerCase is not a function. (In 'candidate. ... I am using AutoComplete API of material UI. there is an object of top100Films which ......
Read more >
[Autocomplete] candidate.toLowerCase is not a function #23572
Just trying to get the autocomplete working with an array of objects. And it's throwing a runtime error, which means that either types...
Read more >
AutoComplete returning "TypeError: "".toLowerCase is not a ...
If I uncomment ignoreCase: false, then I get the error: Uncaught TypeError: Object [object Object] has no method 'lastIndexOf'.
Read more >
candidate.toLowerCase is not a function. (In ... - appsloveworld
Coding example for the question candidate.toLowerCase is not a function. (In 'candidate.toLowerCase()' ... toLowerCase' is undefined) Material UI-Reactjs.
Read more >
TypeError: toLowerCase is not a function in JavaScript
The "toLowerCase is not a function" error occurs when we call the toLowerCase() method on a value that is not a string. To...
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