How to implement tag-like autocomplete for large select choice lists?
Using the select widget with its choices defined in the custom schema becomes a performance issue for large lists of choices, as they are fully loaded when the dataset edit form is rendered. E.g., 2000 lines of geojson for the spatial snippet will significantly slow down the read view.
@wardi could you point me in the right direction: Is there an elegant way to provide an autocompleting box (like the tag snippet) for custom lists of label:value pairs?
There are a couple problems: the first is that that rendering all the options in the form is slow, the second is that enumerating all the options in a schema or preset really bloats the json/yaml file.
We're addressing both of these issues and allowing certain users to edit the list of available values by defining a new type for our code lists and providing an autocomplete api call to drive JS in the form.
We don't have anything generic and reusable yet. @TkTech @mattleduc @thriuin is there something we can point @florianm to in ckanext-stcndm that would provide some more information? I think it would be great if some of this functionality (validatiors, form snipptes, examples) could be moved to ckanext-scheming because it's super-useful.
@marcfor This is what we spoke about recently.