I just recognized that there has been some big changes in how Forge Apps are setup. I immediately setup a new forge app playing around with the new UI Kit and saw that there is now an “isLoading” prop available.
Does this mean we can now fetch a list of options from an external API without the requirement to host a Custom UI?
Hi @DavidIhl , the isLoading prop renders the spinner component within the Select component to give the indication that something is being fetched. This is helpful when you have a list of options that you want to fetch from an API before loading it into the options array.
The below is an example use case of how you could use the prop
To follow up @QuocLieu. In combination with the isSearchable prop this means that I could fetch a default list (e.g. last used) of 10 items and while searching, I can refetch the list signaling with isLoading that the fetch is still going on, correct?
I had a similar problem in my case.
On initialization I fetch the first e.g. 100 results from my server. Then I use onInputChange to recall the API with a searchTerm. The idea is that a user will start to look for his desired item, so if it is just outside the first results the searchTerm will increase the probability to list it (until there is a single result
UX whise I am corrently working on to initialize just a list of the “last used” items. Users should always search for a specific item given this many options anyway.