json-editor
json-editor copied to clipboard
Using Select2 and enum with large data sets
Hi!
I've read the docs, and from what I see, it is hard, if at all possible to create an editable field with a large remote dataset using Select2.
Here is my use case. I have a table with about 200000 locations from geonames.org. I need the user to select and assign location ID to an object property. The property is on integer type.
There are two problems. Problem one is validation (the ID needs to be a valid location ID). This is beyond the scope of this editor and, for that matter, JSON schema. Problem two is actually selecting that location ID using Select2.
I think using a remote data source with Select2 is a useful feature, and I'd like to help implement it. I think to solve my problem I need to do the following:
- Force json-editor to display a select control, even though field type is integer. I'm not sure if it's possible right now.
- Declare a data source url for Select2. Hopefully this will be a cleaner solution than to pass select2_options.ajax function.
What do you think? Looking for your soon reply!
This would be highly useful feature. Have you finished it?
Funny that, we're looking at trying to plug into Geonames as well.
@beowulfenator did you find a solution?
Nope, sorry.