Skip to content

Commit

Permalink
feat: add type for index pattern for apm
Browse files Browse the repository at this point in the history
  • Loading branch information
nlatipov committed Apr 27, 2022
1 parent 58d668c commit e661a82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import type { ValueSuggestionsMethod } from '@kbn/data-plugin/common';
import type { FieldSpec, DataView } from '@kbn/data-views-plugin/common';
import type { DataView } from '@kbn/data-views-plugin/common';
import type { DataViewFieldBase } from '@kbn/es-query';

export enum QuerySuggestionTypes {
Field = 'field',
Expand Down Expand Up @@ -47,7 +48,7 @@ export interface QuerySuggestionBasic {
/** @public **/
export interface QuerySuggestionField extends QuerySuggestionBasic {
type: QuerySuggestionTypes.Field;
field: FieldSpec;
field: DataViewFieldBase;
}

/** @public **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function KueryBar(props: {
const suggestions = (
(await unifiedSearch.autocomplete.getQuerySuggestions({
language: 'kuery',
indexPatterns: [dataView],
indexPatterns: [dataView as DataView],
boolFilter:
props.boolFilter ??
getBoolFilter({
Expand Down

0 comments on commit e661a82

Please sign in to comment.