diff --git a/dist/datasource.js b/dist/datasource.js index 391064e6..faa519fe 100644 --- a/dist/datasource.js +++ b/dist/datasource.js @@ -322,6 +322,15 @@ function (angular, _, dateMath, moment) { var replacedFilters = filters.map(function (filter) { return filterTemplateExpanders[filter.type](filter); }) + .filter(function(filter) { + if(filter.pattern) + return filter.pattern!="_REMOVE_FILTER_" + else if(filter.value) + return filter.value!="_REMOVE_FILTER_" + else + return true + } + ) .map(function (filter) { var finalFilter = _.omit(filter, 'negate'); if (filter.negate) { diff --git a/src/datasource.js b/src/datasource.js index 47f6ec01..b5477bbe 100644 --- a/src/datasource.js +++ b/src/datasource.js @@ -322,6 +322,15 @@ function (angular, _, dateMath, moment) { var replacedFilters = filters.map(function (filter) { return filterTemplateExpanders[filter.type](filter); }) + .filter(function(filter) { + if(filter.pattern) + return filter.pattern!="_REMOVE_FILTER_" + else if(filter.value) + return filter.value!="_REMOVE_FILTER_" + else + return true + } + ) .map(function (filter) { var finalFilter = _.omit(filter, 'negate'); if (filter.negate) {