Explorar o código

fix: datasource search was not working properly

Torkel Ödegaard %!s(int64=7) %!d(string=hai) anos
pai
achega
a4587cdeee
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      public/app/features/plugins/ds_list_ctrl.ts

+ 1 - 0
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);
     });
   }