Commit a4587cde by Torkel Ödegaard

fix: datasource search was not working properly

parent 29291f88
......@@ -19,6 +19,7 @@ export class DataSourcesCtrl {
onQueryUpdated() {
let regex = new RegExp(this.searchQuery, 'ig');
this.datasources = _.filter(this.unfiltered, item => {
regex.lastIndex = 0;
return regex.test(item.name) || regex.test(item.type);
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment