# Programmatically trigger the search action (React UI)

**URL:** <https://discuss.elastic.co/t/programmatically-trigger-the-search-action-react-ui/329943>\
**Category:** Elasticsearch\
**Created:** [April 13, 2023, 3:52pm UTC](https://discuss.elastic.co/t/programmatically-trigger-the-search-action-react-ui/329943 "2023-04-13T15:52:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olivia\_Xu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olivia_xu/32/116915_2.png) [@Olivia\_Xu](https://discuss.elastic.co/u/Olivia_Xu)\
**Post date:** [April 13, 2023, 3:52pm UTC](https://discuss.elastic.co/t/programmatically-trigger-the-search-action-react-ui/329943/1 "2023-04-13T15:52:34Z")

</div>

We hope to programmatically trigger the search action in some cases without the user having to type and click the search button from the front end. We are using React UI components. Is this possible to achieve? We have tried using HTMLElement functions but they are not doing what we expected. Would anyone be able to give us an hand on this? Thanks so much!

![Screen Shot 2023-04-13 at 11.52.22 AM](https://us1.discourse-cdn.com/elastic/original/3X/c/d/cdd4d695a37ea4d71359659b9e0212211d25f046.png)

---

<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:** [May 11, 2023, 3:53pm UTC](https://discuss.elastic.co/t/programmatically-trigger-the-search-action-react-ui/329943/2 "2023-05-11T15:53:03Z")

</div>

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