فهرست منبع

Added a delay to the advanced search text boxes as the user types, so the server isn't pummeled on ever keystroke.

jalbr74 6 سال پیش
والد
کامیت
c996f3d49a

+ 2 - 1
client/src/modules/helpdesk/helpdesk-search-cards.component.html

@@ -41,7 +41,8 @@
                 <option value="" selected disabled>{{ 'Display_SelectAttribute' | translate }}</option>
                 <option ng-repeat="tag in $ctrl.advancedSearchTags" ng-attr-value="{{tag.attribute}}">{{tag.label}}</option>
             </select>
-            <input ng-model="query.value" autocomplete="off" ng-change="$ctrl.onAdvancedSearchValueChanged($event)">
+            <input ng-model="query.value" autocomplete="off" ng-change="$ctrl.onAdvancedSearchValueChanged($event)"
+                   ng-model-options="{debounce: $ctrl.inputDebounce}">
             <ias-button class="ias-icon-button" ng-click="$ctrl.removeSearchTag($index)"
                         ng-attr-title="{{ 'Button_Remove' | translate }}">
                 <ias-icon icon="close_thin"></ias-icon>

+ 2 - 1
client/src/modules/helpdesk/helpdesk-search-table.component.html

@@ -40,7 +40,8 @@
                 <option value="" selected disabled>{{ 'Display_SelectAttribute' | translate }}</option>
                 <option ng-repeat="tag in $ctrl.advancedSearchTags" ng-attr-value="{{tag.attribute}}">{{tag.label}}</option>
             </select>
-            <input ng-model="query.value" autocomplete="off" ng-change="$ctrl.onAdvancedSearchValueChanged($event)">
+            <input ng-model="query.value" autocomplete="off" ng-change="$ctrl.onAdvancedSearchValueChanged($event)"
+                   ng-model-options="{debounce: $ctrl.inputDebounce}">
             <ias-button class="ias-icon-button" ng-click="$ctrl.removeSearchTag($index)"
                         ng-attr-title="{{ 'Button_Remove' | translate }}">
                 <ias-icon icon="close_thin"></ias-icon>

+ 2 - 1
client/src/modules/peoplesearch/peoplesearch-cards.component.html

@@ -40,7 +40,8 @@
                 <option value="" selected disabled>{{ 'Display_SelectAttribute' | translate }}</option>
                 <option ng-repeat="tag in $ctrl.advancedSearchTags" ng-attr-value="{{tag.attribute}}">{{tag.label}}</option>
             </select>
-            <input ng-model="query.value" autocomplete="off" ng-change="$ctrl.onAdvancedSearchValueChanged($event)">
+            <input ng-model="query.value" autocomplete="off" ng-change="$ctrl.onAdvancedSearchValueChanged($event)"
+                   ng-model-options="{debounce: $ctrl.inputDebounce}">
             <ias-button class="ias-icon-button" ng-click="$ctrl.removeSearchTag($index)"
                         ng-attr-title="{{ 'Button_Remove' | translate }}">
                 <ias-icon icon="close_thin"></ias-icon>

+ 2 - 1
client/src/modules/peoplesearch/peoplesearch-table.component.html

@@ -40,7 +40,8 @@
                 <option value="" selected disabled>{{ 'Display_SelectAttribute' | translate }}</option>
                 <option ng-repeat="tag in $ctrl.advancedSearchTags" ng-attr-value="{{tag.attribute}}">{{tag.label}}</option>
             </select>
-            <input ng-model="query.value" autocomplete="off" ng-change="$ctrl.onAdvancedSearchValueChanged($event)">
+            <input ng-model="query.value" autocomplete="off" ng-change="$ctrl.onAdvancedSearchValueChanged($event)"
+                   ng-model-options="{debounce: $ctrl.inputDebounce}">
             <ias-button class="ias-icon-button" ng-click="$ctrl.removeSearchTag($index)"
                         ng-attr-title="{{ 'Button_Remove' | translate }}">
                 <ias-icon icon="close_thin"></ias-icon>