Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FAQ section or tutorial: How to handle dynamic enum elements #270

Open
sdirix opened this issue Jun 27, 2023 · 0 comments · May be fixed by #278
Open

Add FAQ section or tutorial: How to handle dynamic enum elements #270

sdirix opened this issue Jun 27, 2023 · 0 comments · May be fixed by #278
Assignees
Labels

Comments

@sdirix
Copy link
Member

sdirix commented Jun 27, 2023

Use case: enum options are derived from other fields and queried from an API.

Example: https://jsonforms.discourse.group/t/dynamic-enum-values/837

Example: Country, Region, City

  1. Define API and place in React context
  2. Consume context in custom renderer
  3. Trigger API to get country values -> Render them
  4. In Region renderer: use useJsonForms() to resolve country data
  5. Use country data against API to resolve regions
  6. etc.

Optional: data resolving and fetch utils can be provided by a HOC

@sdirix sdirix added the next label Jun 27, 2023
@sdirix sdirix changed the title Add FAQ section: How to handle dynamic enum elements Add FAQ section or tutorial: How to handle dynamic enum elements Sep 5, 2023
LukasBoll added a commit to LukasBoll/jsonforms2-website that referenced this issue Oct 9, 2023
LukasBoll added a commit to LukasBoll/jsonforms2-website that referenced this issue Oct 9, 2023
@LukasBoll LukasBoll linked a pull request Oct 9, 2023 that will close this issue
LukasBoll added a commit to LukasBoll/jsonforms2-website that referenced this issue Jan 31, 2024
LukasBoll added a commit to LukasBoll/jsonforms2-website that referenced this issue Mar 4, 2024
Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
closes eclipsesource#270
LukasBoll added a commit to LukasBoll/jsonforms2-website that referenced this issue Apr 15, 2024
Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
closes eclipsesource#270
LukasBoll added a commit to LukasBoll/jsonforms2-website that referenced this issue Apr 15, 2024
Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
closes eclipsesource#270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants