# How to implement handlers to render my own data with Search UI

**URL:** <https://discuss.elastic.co/t/how-to-implement-handlers-to-render-my-own-data-with-search-ui/239204>\
**Category:** Elasticsearch\
**Created:** [June 30, 2020, 12:14am UTC](https://discuss.elastic.co/t/how-to-implement-handlers-to-render-my-own-data-with-search-ui/239204 "2020-06-30T00:14:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spadel](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@spadel](https://discuss.elastic.co/u/spadel)\
**Post date:** [June 30, 2020, 12:14am UTC](https://discuss.elastic.co/t/how-to-implement-handlers-to-render-my-own-data-with-search-ui/239204/1 "2020-06-30T00:14:15Z")

</div>

I worked through the Elastic Search UI on github and finally found what I need, to render my own data:

> <https://github.com/elastic/search-ui/blob/master/ADVANCED.md#build-your-own-component>

It seems like I can implement a handler, that takes the search query, so that I can send it to my API and render my json file. I did implement it like that within the config constant:

```
import myData from './data.json';
...
apiConnector: connector,
onSearch: async state => {
    return myData;

```

Indeed, my json file is rendered. Actually, as a test, `myData` is a json file that contains the same national parks as in the example. **However** , I cannot use the functionality of the Search UI anymore, that means I cannot apply filters, sort by title/relevance or anything. How can I fix that?

Thank you for your help!

---

<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:** [July 28, 2020, 12:14am UTC](https://discuss.elastic.co/t/how-to-implement-handlers-to-render-my-own-data-with-search-ui/239204/2 "2020-07-28T00:14:16Z")

</div>

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