Loki query editor is starting to work, had to make changes to explore query field in order to update query from the outside without unmount between

This commit is contained in:
Torkel Ödegaard
2019-01-23 17:44:22 +01:00
parent 90787a5299
commit 02083d71c8
12 changed files with 94 additions and 30 deletions

View File

@@ -12,6 +12,7 @@ import QueryField, { TypeaheadInput, QueryFieldState } from 'app/features/explor
import { getNextCharacter, getPreviousCousin } from 'app/features/explore/utils/dom';
import BracesPlugin from 'app/features/explore/slate-plugins/braces';
import RunnerPlugin from 'app/features/explore/slate-plugins/runner';
import LokiDatasource from '../datasource';
// Types
import { LokiQuery } from '../types';
@@ -64,7 +65,7 @@ interface CascaderOption {
}
interface LokiQueryFieldProps {
datasource: any;
datasource: LokiDatasource;
error?: string | JSX.Element;
hint?: any;
history?: any[];
@@ -79,7 +80,7 @@ interface LokiQueryFieldState {
syntaxLoaded: boolean;
}
class LokiQueryField extends React.PureComponent<LokiQueryFieldProps, LokiQueryFieldState> {
export class LokiQueryField extends React.PureComponent<LokiQueryFieldProps, LokiQueryFieldState> {
plugins: any[];
pluginsSearch: any[];
languageProvider: any;