[Autocomplete] Nested properties in options do not work
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 😯
When using nested properties in the options property, the autocompletion does not work as expected.
Expected Behavior 🤔
The autocompletion should work with nested properties - I assumed it should work just fine because I thought the component just compares the input with the option label (apparently it doesn’t?).
Steps to Reproduce 🕹
https://codesandbox.io/s/material-demo-37zh6
Steps:
- Click on the “Combo box” - as you can see there are three options available (the options render correctly)
- Now type in “m” or “M” or “is” (or whatever) and you will see, the suggestions only show up when using certain letters (for example “j” - the letter isn’t even in a username or in a property)
Context 🔦
It is easier to keep the data structure and immediately use it as-is in the options. In the meantime (or if this isn’t a bug) map
would be a workaround.
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v4.8.2 |
Material-UI Lab | v4.0.0-alpha.38 |
React | v16.12.0 |
Browser | Google Chrome, v79.0.3945.88 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
[Autocomplete] Nested properties in options do not work #19076
When using nested properties in the options property, the autocompletion does not work as expected. Expected Behavior. The autocompletion ...
Read more >Material UI Autocomplete: Unable to populate nested array ...
In Material UI's autocomplete I want to be able to populate 'type' property as the groupBy heading which is working but I am...
Read more >Reshaping sources | Autocomplete - Algolia
Autocomplete supports conditional sources: sources sometimes exist and sometimes don't. This can happen when you display a source on an empty ...
Read more >MySQL Shell 8.0 :: 5.3 Code Autocompletion
MySQL Shell supports autocompletion of text preceding the cursor by pressing the Tab key. The Section 3.1, “MySQL Shell Commands” can be autocompleted...
Read more >Example: Autocompletion - CodeMirror
The @codemirror/autocomplete package provides functionality for displaying input suggestions in the editor. This example shows how to enable it and how to write ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kartik918 I’m giving up on the idea, better let users customize the filter to avoid unexpected behavior
Thanks for the interest.