mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Adds logs highlighting in Explore on keypress (#16596)
Fixes: #16277
This commit is contained in:
parent
75f9adf44f
commit
7b63913dc1
@ -151,6 +151,9 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS
|
|||||||
if (textChanged && invokeParentOnValueChanged) {
|
if (textChanged && invokeParentOnValueChanged) {
|
||||||
this.executeOnQueryChangeAndExecuteQueries();
|
this.executeOnQueryChangeAndExecuteQueries();
|
||||||
}
|
}
|
||||||
|
if (textChanged && !invokeParentOnValueChanged) {
|
||||||
|
this.updateLogsHighlights();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -163,6 +166,13 @@ export class QueryField extends React.PureComponent<QueryFieldProps, QueryFieldS
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
updateLogsHighlights = () => {
|
||||||
|
const { onQueryChange } = this.props;
|
||||||
|
if (onQueryChange) {
|
||||||
|
onQueryChange(Plain.serialize(this.state.value));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
executeOnQueryChangeAndExecuteQueries = () => {
|
executeOnQueryChangeAndExecuteQueries = () => {
|
||||||
// Send text change to parent
|
// Send text change to parent
|
||||||
const { onQueryChange, onExecuteQuery } = this.props;
|
const { onQueryChange, onExecuteQuery } = this.props;
|
||||||
|
Loading…
Reference in New Issue
Block a user