How can I auto-complete the field of an array element?
See original GitHub issueGeneral information
I followed this wiki to get auto-complete working on a simple object field at the top of my schema.
Now I’m trying to do the same for a field of an array object and I cannot get it working. Also, I couldn’t find any solutions online.
- json-editor version: 1.3.5
Imagine the following schema:
{
"title": "Store",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"city": {
"type": "string"
},
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"price": {"type": "number"}
}
}
}
}
}
I am able to autocomplete the store name, but I don’t know how to proceed with the product name.
Do you have an example?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
How To Create Autocomplete on an Input Field
Step 5) Initiate the Autocomplete Effect on "myInput": Example. Pass the countries array as the second parameter of the autocomplete function: <script>
Read more >JQuery Autocomplete using array as source should display ...
I am using Jquery autocomplete and array as source and I want to display the label instead of the value because i am...
Read more >Filtering and Selection of AutoComplete for a field ...
I am have data like following: {. companyname:'',. locations:[ {address: 'address1', city:'city1', state:'state1'},.
Read more >Atlas Search Autocomplete on an array of object
You can use the autocomplete type to index string fields inside an array of documents indexed as the embeddedDocuments type.
Read more >Autocomplete value to array
I would like to use the “AutoComplete” on the “Video” form to select one category and then store it on a Array, if...
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
@pauldamian I would do it like this: https://is.gd/Vg65xR The “ready” event is used for attaching the handler to the static fields and the “change” event loops through the editors and attach the handler to the dynamic array elements.
When you “watch” an editor, the event is first triggered
AFTER
you exit focus on the field, so that’s why your code doesn’t work as expected.Thanks, @pmk65, really appreciate it!