From a4587cdeeeb86f153ff6b55d26209cda164633a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 Jul 2018 14:28:38 +0200 Subject: [PATCH] fix: datasource search was not working properly --- public/app/features/plugins/ds_list_ctrl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/public/app/features/plugins/ds_list_ctrl.ts b/public/app/features/plugins/ds_list_ctrl.ts index 577b931551a..89c760ae253 100644 --- a/public/app/features/plugins/ds_list_ctrl.ts +++ b/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); }); }