Merge pull request #2491 from opf/feature/work-packages-filter-debounce

Add debounce to wp filters accepting text values
pull/2560/head
ulferts 10 years ago
commit 33322e3f37
  1. 5
      frontend/app/work_packages/directives/query-filter-directive.js
  2. 5
      frontend/public/templates/work_packages/query_filters.html

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

@ -42,6 +42,7 @@
<input ng-switch-when="string"
ng-model="filter.textValue"
ng-model-options="::filterModelOptions"
ng-required="true"
class="advanced-filters--text-field"
id="values-{{filter.name}}"
@ -58,6 +59,7 @@
<input ng-switch-when="text"
ng-model="filter.textValue"
ng-model-options="::filterModelOptions"
ng-required="true"
class="advanced-filters--text-field"
id="values-{{filter.name}}"
@ -72,6 +74,7 @@
<input ng-switch-when="integer"
ng-model="filter.textValue"
ng-model-options="::filterModelOptions"
ng-required="true"
class="advanced-filters--number-field"
id="values-{{filter.name}}"
@ -86,6 +89,7 @@
<span class="inline-label" ng-switch-when="date">
<input ng-model="filter.textValue"
ng-model-options="::filterModelOptions"
ng-required="true"
class="advanced-filters--text-field"
id="values-{{filter.name}}"
@ -100,6 +104,7 @@
<span class="inline-label" ng-switch-when="date_past">
<input ng-model="filter.textValue"
ng-model-options="::filterModelOptions"
ng-required="true"
class="advanced-filters--text-field"
id="values-{{filter.name}}"

Loading…
Cancel
Save