# Do not show results on page load

**URL:** <https://discuss.elastic.co/t/do-not-show-results-on-page-load/281975>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [August 19, 2021, 1:49pm UTC](https://discuss.elastic.co/t/do-not-show-results-on-page-load/281975 "2021-08-19T13:49:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anuragchoudhary01](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anuragchoudhary01/32/83611_2.png) [@anuragchoudhary01](https://discuss.elastic.co/u/anuragchoudhary01)\
**Post date:** [August 19, 2021, 1:49pm UTC](https://discuss.elastic.co/t/do-not-show-results-on-page-load/281975/1 "2021-08-19T13:49:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Brian\_McGue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_mcgue/32/63366_2.png) [@Brian\_McGue](https://discuss.elastic.co/u/Brian_McGue)\
**Post date:** [August 25, 2021, 8:43pm UTC](https://discuss.elastic.co/t/do-not-show-results-on-page-load/281975/2 "2021-08-25T20:43:19Z")

</div>

Hi @anuragchoudhary01! Are you setting `alwaysSearchOnInitialLoad` by any chance? The [documentation](https://github.com/elastic/search-ui/blob/master/ADVANCED.md#connectors-and-handlers) 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.

---

<div class="post-metadata">

**Author:** ![anuragchoudhary01](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anuragchoudhary01/32/83611_2.png) [@anuragchoudhary01](https://discuss.elastic.co/u/anuragchoudhary01)\
**Post date:** [August 26, 2021, 5:31am UTC](https://discuss.elastic.co/t/do-not-show-results-on-page-load/281975/3 "2021-08-26T05:31:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 23, 2021, 5:32am UTC](https://discuss.elastic.co/t/do-not-show-results-on-page-load/281975/4 "2021-09-23T05:32:30Z")

</div>

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