mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Loki: fix filter expression suggestions (#21290)
* Loki: fix filter expression suggestions - dont suggest term completion items in filter expression - allow at least one character before suggesting term items - keep logql expression when switching between Metrics/Logs mode - show only history by default in completion items * Clear results when changing mode
This commit is contained in:
@@ -146,7 +146,7 @@ export default class PromQlLanguageProvider extends LanguageProvider {
|
||||
// Prevent suggestions in `function(|suffix)`
|
||||
const noSuffix = !nextCharacter || nextCharacter === ')';
|
||||
|
||||
// Empty prefix is safe if it does not immediately follow a complete expression and has no text after it
|
||||
// Prefix is safe if it does not immediately follow a complete expression and has no text after it
|
||||
const safePrefix = prefix && !text.match(/^[\]})\s]+$/) && noSuffix;
|
||||
|
||||
// About to type next operand if preceded by binary operator
|
||||
|
||||
Reference in New Issue
Block a user