json-editor icon indicating copy to clipboard operation
json-editor copied to clipboard

Using Select2 and enum with large data sets

Open beowulfenator opened this issue 10 years ago • 3 comments

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:

  1. Force json-editor to display a select control, even though field type is integer. I'm not sure if it's possible right now.
  2. 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!

beowulfenator avatar Jul 08 '15 15:07 beowulfenator

This would be highly useful feature. Have you finished it?

suricactus avatar Jun 26 '16 08:06 suricactus

Funny that, we're looking at trying to plug into Geonames as well.

@beowulfenator did you find a solution?

loganvolkers avatar Oct 12 '17 20:10 loganvolkers

Nope, sorry.

beowulfenator avatar Oct 13 '17 09:10 beowulfenator