brutusin / brutusin/json-forms

A Lookup field with a dynamic autocompletion

Open
#112 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
618
Forks
171
PR merge metrics
No merged PRs in 30d

Description

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 😉

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the library's extensibility points for form fields and its handling of dynamic subschemas. Define how user-entered labels map to numeric identifiers, how asynchronous suggestions are supplied, and how selected values are represented before proposing an implementation and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.