Constructor-io / constructorio-ui-autocomplete

Constructor.io Autocomplete UI library for web applications
https://constructor-io.github.io/constructorio-ui-autocomplete
MIT License
13 stars 1 forks source link

How to trigger zeroStateSections search again without reloading the page? #178

Open Kawaljit opened 3 weeks ago

Kawaljit commented 3 weeks ago

Hi team,

We are working on implementing dynamically updated filter values for the zeroStateSections feature in our Next.js application, which will occur multiple times throughout the user session. However, we've observed that zeroStateSections results are only fetched once—either on page load or on the first focus of the input element, depending on the fetchZeroStateOnFocus setting.

The issue arises when updating the filter values: no new API calls are triggered, and as a result, the zeroStateSections continue to display the initial results from the first call, without reflecting the updated filters.

Is there a solution to re-fetch zeroStateSections without requiring a full page reload?

Thanks Kawal

mocca102 commented 3 weeks ago

Hey @Kawaljit Thank you for raising this. We created a story and will be adding this to the library. Is this blocking to you currently?

Kawaljit commented 2 weeks ago

Hi @mocca102 thanks for the quick response! It’s not blocking at the moment, but it would definitely help to have it sooner.