# Lazy loading Combobox

**URL:** <https://jsonforms.discourse.group/t/lazy-loading-combobox/639>\
**Category:** General\
**Created:** [March 4, 2022, 12:22am UTC](https://jsonforms.discourse.group/t/lazy-loading-combobox/639 "2022-03-04T00:22:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mak006](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/mak006/32/265_2.png) [@Mak006](https://jsonforms.discourse.group/u/Mak006)\
**Post date:** [March 4, 2022, 12:22am UTC](https://jsonforms.discourse.group/t/lazy-loading-combobox/639/1 "2022-03-04T00:22:11Z")

</div>

Hello,

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!

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [March 9, 2022, 11:29am UTC](https://jsonforms.discourse.group/t/lazy-loading-combobox/639/2 "2022-03-09T11:29:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mak006](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/mak006/32/265_2.png) [@Mak006](https://jsonforms.discourse.group/u/Mak006)\
**Post date:** [March 22, 2022, 9:39pm UTC](https://jsonforms.discourse.group/t/lazy-loading-combobox/639/3 "2022-03-22T21:39:10Z")

</div>

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