Autocomplete not updating value
See original GitHub issueGeneral 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:
- Created 2 years ago
- Comments:7
Top 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 >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
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.
fixed in https://github.com/json-editor/json-editor/pull/1136