Skip to content

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

Open
@sdirix

Description

@sdirix

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions