Hi Team,
I am using data plugin for elastic queries. In my project i have used kibana search bar as below
<navigation.ui.TopNavMenu
appName={PLUGIN_ID}
showSearchBar={true}
useDefaultBehaviors={true}
indexPatterns={indexPattern ? [indexPattern] : undefined}
onQuerySubmit={(payload) => onRefreshClick(payload)}
onFiltersUpdated={(filters) => refresh(filters)}
onQueryChange={(payload) => refresh(payload)}
/>
In project if i have to add any filter on item click I am using below code
const patternIndex = props.indexPattern;
const filterType = FILTERS.PHRASE;
const newFilter = buildFilter(patternIndex, patternIndex.getFieldByName(filterField), filterType, true, false, filterVal, null, FilterStateStore.APP_STATE);
props.data.query.filterManager.addFilters(newFilter);
But when I remove the applied filter i have to hit refresh button in search bar to reflect the changes.
Can you guys help me out so that on removal of added filter the page should automatically reload. How can I catch filter removal event to the same.
Regards
Praveer.