fix: datasource search was not working properly

pull/12642/head
Torkel Ödegaard 7 years ago
parent 29291f88b1
commit a4587cdeee
  1. 1
      public/app/features/plugins/ds_list_ctrl.ts

@ -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);
});
}

Loading…
Cancel
Save