[TSVB] query bar shows randomly in editor page (#35081)

* [TSVB] query bar shows randomly in editor page

Fix: #31267

* Fix PR comments
This commit is contained in:
Alexey Antonov 2019-04-22 19:40:20 +03:00 committed by GitHub
parent 849e1f5908
commit c1e5948144
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 5 deletions

View file

@ -23,7 +23,6 @@
is-refresh-paused="model.refreshInterval.pause" is-refresh-paused="model.refreshInterval.pause"
refresh-interval="model.refreshInterval.value" refresh-interval="model.refreshInterval.value"
on-refresh-change="onRefreshChange" on-refresh-change="onRefreshChange"
watch-depth="reference"
></search-bar> ></search-bar>
</div> </div>
</div> </div>

View file

@ -45,7 +45,6 @@
is-refresh-paused="refreshInterval.pause" is-refresh-paused="refreshInterval.pause"
refresh-interval="refreshInterval.value" refresh-interval="refreshInterval.value"
on-refresh-change="onRefreshChange" on-refresh-change="onRefreshChange"
watch-depth="reference"
></search-bar> ></search-bar>
</div> </div>
</div> </div>

View file

@ -45,7 +45,6 @@
refresh-interval="refreshInterval.value" refresh-interval="refreshInterval.value"
show-auto-refresh-only="showAutoRefreshOnlyInQueryBar" show-auto-refresh-only="showAutoRefreshOnlyInQueryBar"
on-refresh-change="onRefreshChange" on-refresh-change="onRefreshChange"
watch-depth="reference"
></search-bar> ></search-bar>
</div> </div>
</div> </div>

View file

@ -39,6 +39,10 @@ interface DateRange {
to: string; to: string;
} }
/**
* NgReact lib requires that changes to the props need to be made in the directive config as well
* See [search_bar\directive\index.js] file
*/
interface Props { interface Props {
query: { query: {
query: string; query: string;

View file

@ -27,10 +27,33 @@ const app = uiModules.get('app/kibana', ['react']);
app.directive('searchBar', (reactDirective, localStorage) => { app.directive('searchBar', (reactDirective, localStorage) => {
return reactDirective( return reactDirective(
wrapInI18nContext(SearchBar), wrapInI18nContext(SearchBar),
undefined, [
['query', { watchDepth: 'reference' }],
['store', { watchDepth: 'reference' }],
['intl', { watchDepth: 'reference' }],
['onQuerySubmit', { watchDepth: 'reference' }],
['onFiltersUpdated', { watchDepth: 'reference' }],
['onRefreshChange', { watchDepth: 'reference' }],
['indexPatterns', { watchDepth: 'collection' }],
['filters', { watchDepth: 'collection' }],
'appName',
'screenTitle',
'showFilterBar',
'showQueryBar',
'showDatePicker',
'dateRangeFrom',
'dateRangeTo',
'isRefreshPaused',
'refreshInterval',
'disableAutoFocus',
'showAutoRefreshOnly',
],
{}, {},
{ {
store: localStorage, store: localStorage,
} },
); );
}); });