Do not show results on page load

Hi Team,

Is there any flag that I need to set to not display the results during the page load? I am using search-ui.

I need the search bar only when a page is loaded, only when a user puts certain text to the search bar then only it should display the results.

Hi @anuragchoudhary01! Are you setting alwaysSearchOnInitialLoad by any chance? The documentation says it's set to false by default, but maybe you could play around with that?

You also mention only wanting to search when the user queries certain text. You might be able to hook into the onSearch function and cancel the query unless it's a query that your application is comfortable searching.

Let me know if this is useful or not. I'm not the most familiar with Search UI personally, but I can talk to folks who know it better if these suggestions aren't helpful.

1 Like

This helps, I missed that flag. It was set to true. Thanks very much for pointing it out.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.