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] 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:

  1. Click on the “Combo box” - as you can see there are three options available (the options render correctly)
  2. 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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Jan 5, 2020

@kartik918 I’m giving up on the idea, better let users customize the filter to avoid unexpected behavior

0reactions
oliviertassinaricommented, Jan 5, 2020

Thanks for the interest.

Read more comments on GitHub >

github_iconTop 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 >

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