Lazy loading Combobox


I was wondering, are there any good common patterns to lazyload a combobox (type=“enum”)? Essentially I’m looking for a standard way to populate our dropdown with data from a URL, and also ensure some basic level of validation. I can think of a couple of ways to extend the json schema to provide the info required, however is there a better approach?

Thanks in advance!

Hi @Mak006, Thanks for your question!

Lazy loading, especially enum values, is an often needed use case. In theory you could dynamically exchange the JSON Schema enriched with your retrieved enum values, however this is often too restrictive of an approach and/or does not scale to use cases with thousands of potential values.

Usually we suggest to implement a custom renderer which takes care of requesting and displaying the values. Depending on your exact UI requirements you could reuse one of our existing enum renderers or just write a new one from scratch.

Based on your requirements you may just hard code the end point to contact or place the data URL to retrieve the values in the JSON Schema to still have a declarative pattern.

Thanks for the reply! That’s exactly the approach we went with!