Change behavior of Template Variables autocomplete filtering in Query Editor to match from front of string only (#1474)
* Filter template variables by exact match from front of string * Changedate uplog * Use a more semantic method for filtering * Clarify changebogpull/10616/head
parent
c74fbf5f17
commit
7766e75b05
|
@ -8,6 +8,7 @@
|
|||
|
||||
### Features
|
||||
1. [#1477](https://github.com/influxdata/chronograf/pull/1477): Add ability to log alerts
|
||||
1. [#1474](https://github.com/influxdata/chronograf/pull/1474): Change behavior of template variable autocomplete to filter by exact match from front of string
|
||||
|
||||
### UI Improvements
|
||||
1. [#1451](https://github.com/influxdata/chronograf/pull/1451): Refactor scrollbars to support non-webkit browsers
|
||||
|
|
|
@ -164,7 +164,7 @@ class QueryEditor extends Component {
|
|||
const start = this.editor.selectionStart
|
||||
const end = this.editor.selectionEnd
|
||||
const filteredTemplates = templates.filter(t =>
|
||||
t.tempVar.includes(matched[0].substring(1))
|
||||
t.tempVar.startsWith(matched[0])
|
||||
)
|
||||
|
||||
const found = filteredTemplates.find(
|
||||
|
|
Loading…
Reference in New Issue