mirror of
https://github.com/correl/melpa.git
synced 2024-12-22 11:08:54 +00:00
Make debounce delay explicit
This commit is contained in:
parent
9d7a19d624
commit
234384d3a7
2 changed files with 4 additions and 3 deletions
|
@ -171,11 +171,12 @@
|
|||
require: "ngModel",
|
||||
scope: {
|
||||
"ngModel": "=",
|
||||
"debounceModel": "="
|
||||
"debounceModel": "=",
|
||||
"debounceDelay": "@"
|
||||
},
|
||||
link: function (scope, element, attrs, ngModel) {
|
||||
//jshint unused: false
|
||||
var delay = 250;
|
||||
var delay = parseInt(scope.debounceDelay, 10) || 250;
|
||||
var copyValue;
|
||||
scope.$watch(function() {
|
||||
return ngModel.$modelValue;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<small ng-show="totalDownloads">(<span ng-bind="totalDownloads"></span> downloads to date)</small>
|
||||
</h2>
|
||||
<p>
|
||||
<input type="text" ng-model="enteredSearchTerms" debounce-model="searchTerms" placeholder="Enter filter terms" autofocus>
|
||||
<input type="text" ng-model="enteredSearchTerms" debounce-model="searchTerms" debounce-delay="250" placeholder="Enter filter terms" autofocus>
|
||||
<span class="muted"> <ng-pluralize when="{1: '1 match', 'other': '{} matches'}" count="(packages | filter:packageMatcher(searchTerms)).length"/></span>
|
||||
</p>
|
||||
<table id="package-list" class="table table-bordered table-responsive table-hover">
|
||||
|
|
Loading…
Reference in a new issue