# Custom Vis, extend query\_filter in version 5.5.0

**URL:** <https://discuss.elastic.co/t/custom-vis-extend-query-filter-in-version-5-5-0/94282>\
**Category:** Kibana\
**Created:** [July 24, 2017, 7:39am UTC](https://discuss.elastic.co/t/custom-vis-extend-query-filter-in-version-5-5-0/94282 "2017-07-24T07:39:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pts0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pts0/32/17811_2.png) [@pts0](https://discuss.elastic.co/u/pts0)\
**Post date:** [July 24, 2017, 7:39am UTC](https://discuss.elastic.co/t/custom-vis-extend-query-filter-in-version-5-5-0/94282/1 "2017-07-24T07:39:27Z")

</div>

Hi,

I have written a custom visualization that extend query filter. Basically it set a filter based on time when event happen. Dashboard is then filtered based on time when event A happened fist time and event A happened again.

Let say we have events:

```
A1 : 20.07.2017 at 15.00 
                          > filter1 
A2 : 21.07.2017 at 16.21 
                           > filter2
A3: 22.07.2017 at 18.00

```

The visualization get a pull down with filter1 / filter2 option an based on what the user select the filter is set.

Till version 5.4.0 was all fine. Now with 5.5.0 I get the error  
`TypeError: Expected private module "[object Object]" to be a function`  
when i try to extend `'ui/filter_bar/query_filter'` with my visualization.

Did I miss something ?

Thanks

pts0

---

<div class="post-metadata">

**Author:** ![pts0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pts0/32/17811_2.png) [@pts0](https://discuss.elastic.co/u/pts0)\
**Post date:** [July 24, 2017, 3:55pm UTC](https://discuss.elastic.co/t/custom-vis-extend-query-filter-in-version-5-5-0/94282/2 "2017-07-24T15:55:48Z")

</div>

ok, I sorted out what my error was. Just a quick update here, maybe somebody else have the same issue and may help a solution.

I had in my original implementation this to access query filter element in kibana:

```
export const KibanaQueryFilter = (Private) => {
  return Private(require('ui/filter_bar/query_filter'));
};

```

and starting with 5.5.0 it stop work, now sould be used the following:

```
import {FilterBarQueryFilterProvider} from 'ui/filter_bar/query_filter';

export const KibanaQueryFilter = (Private) => {
  return Private(FilterBarQueryFilterProvider);
};

```

and all works well again.

🙂

---

<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:** [August 21, 2017, 3:56pm UTC](https://discuss.elastic.co/t/custom-vis-extend-query-filter-in-version-5-5-0/94282/3 "2017-08-21T15:56:00Z")

</div>

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