json-forms
json-forms copied to clipboard
A Lookup field with a dynamic autocompletion
This is a rather advanced thing, and I'm not sure it's totally possible within the specs, but here's the use case.
I got a schema that describes an object, where this object holds numeric identifiers referrencing other entities. The referenced entities are not only user-defined, but very big in size, and therefore cannot be expressed as Enums.
Ideally, I would like a lookup field where which is a user-facing text-field, but the data-underlying is a numeric id. Obviously, the lookup can be done by a the library user, as a function that accepts the user-input and resolves to a list of auto-suggested options from which the user may chose, each expressed by front-facing title, and underlying ID.
Basically, for me - all these lookups are for many-to-many relations. But I can think of many other use-cases - like translating addresses to long/lat pairs vs a geo-location service, etc.
If you can propose a way to accomplish this - I may even be able to work on this with you. I'll just need to understand the implementation vision and some point to the right direction 😉