From 7c7b90e18c4344f59a7765f7c2b600eb1e507f55 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Mon, 2 Feb 2015 16:45:56 +0100 Subject: [PATCH] Add debounce to wp filters accepting text values Signed-off-by: Alex Coles --- .../app/work_packages/directives/query-filter-directive.js | 5 +++++ frontend/public/templates/work_packages/query_filters.html | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/frontend/app/work_packages/directives/query-filter-directive.js b/frontend/app/work_packages/directives/query-filter-directive.js index 8ef55cad61..fc8837a186 100644 --- a/frontend/app/work_packages/directives/query-filter-directive.js +++ b/frontend/app/work_packages/directives/query-filter-directive.js @@ -45,6 +45,11 @@ module.exports = function( scope.I18n = I18n; scope.isLoading = false; // shadow isLoading as its used for a different purpose in this context + scope.filterModelOptions = { + updateOn: 'default blur', + debounce: { 'default': 400, 'blur': 0 } + }; + $animate.enabled(false, element); scope.showValueOptionsAsSelect = !scope.filter.isSingleInputField(); diff --git a/frontend/public/templates/work_packages/query_filters.html b/frontend/public/templates/work_packages/query_filters.html index 72adfb1be8..6584900ebf 100644 --- a/frontend/public/templates/work_packages/query_filters.html +++ b/frontend/public/templates/work_packages/query_filters.html @@ -42,6 +42,7 @@