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 not updating value

See original GitHub issue

General information

  • json-editor version: 2.5.4

Expected behavior

Using the autocomplete, if a value is already selected and you click on the input, the results are showed again. If you click on another result (probably the previous value is a prefix of the new results), the value should be updated.

Actual behavior

When selecting another result without typing anything in the input, the value is selected in the autocomplete, but is not updated in the jsonschema; probably the onChange is not fired.

Steps to reproduce the behavior

"options": {
      "autocomplete": {
      search": "reference_system_identifier_autocomplete",
      getResultValue": "reference_system_identifier_getResultValue",
      renderResult": "reference_system_identifier_render",
      autoSelect": true
    }
},

I’ve checked the changelogs after the 2.5.4 and it doesn’t seem that this issue has been addressed.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
schmunk42commented, Mar 8, 2022

I created an example here: https://is.gd/cPbrqj

Note: You need to set window.JSONEditor.defaults.callbacks before initializing the JSONeditor instance.

I can reproduce your issues especially when clicking a result with the mouse. When using the keyboard (arrows) and Enter to select an entry it works much better. Can you confirm that?

Nonetheless it has to be fixed, it looks like an event is not fired properly when clicking an item in the list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - MUI Autocomplete not updating selected value when ...
Solution: For solution on your codesandbox you need 2 steps to fix your problem;. Make selected useStates initial values null inside App.js.
Read more >
[Autocomplete] does not update displayed value if options are ...
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >
MUI Autocomplete Get and Set Values, Default Values, and ...
If we create a state value and update it when the Autocomplete's value changes, then we can use that value in other components....
Read more >
React Autocomplete component - Material UI - MUI
The autocomplete is a normal text input enhanced by a panel of suggested options. The widget is useful for setting the value of...
Read more >
Jquery autocomplete not updating while typing - Laracasts
Jquery autocomplete not updating while typing ... I have a form that I wish to use auto complete on, but when I type...
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