Skip to content

Commit 9babf2e

Browse files
committed
feat: update dist files
1 parent a47696d commit 9babf2e

File tree

6 files changed

+25
-19
lines changed

6 files changed

+25
-19
lines changed

dist/autocomplete.angular.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,19 +2479,21 @@
24792479
handleSuggestions.apply(this, [this.cachedSuggestions].concat(this.cachedRenderExtraArgs));
24802480
} else {
24812481
var that = this;
2482-
var execSource = function() { that.source(query, handleSuggestions.bind(that)); };
2482+
var execSource = function() {
2483+
// When the call is debounced the condition avoid to do a useless
2484+
// request with the last character when the input has been cleared
2485+
if (!that.canceled) {
2486+
that.source(query, handleSuggestions.bind(that));
2487+
}
2488+
};
24832489

24842490
if (this.debounce) {
24852491
var later = function() {
24862492
that.debounceTimeout = null;
24872493
execSource();
24882494
};
2489-
var callNow = !this.debounceTimeout;
24902495
clearTimeout(this.debounceTimeout);
24912496
this.debounceTimeout = setTimeout(later, this.debounce);
2492-
if (callNow) {
2493-
execSource();
2494-
}
24952497
} else {
24962498
execSource();
24972499
}

dist/autocomplete.angular.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/autocomplete.jquery.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,19 +2528,21 @@
25282528
handleSuggestions.apply(this, [this.cachedSuggestions].concat(this.cachedRenderExtraArgs));
25292529
} else {
25302530
var that = this;
2531-
var execSource = function() { that.source(query, handleSuggestions.bind(that)); };
2531+
var execSource = function() {
2532+
// When the call is debounced the condition avoid to do a useless
2533+
// request with the last character when the input has been cleared
2534+
if (!that.canceled) {
2535+
that.source(query, handleSuggestions.bind(that));
2536+
}
2537+
};
25322538

25332539
if (this.debounce) {
25342540
var later = function() {
25352541
that.debounceTimeout = null;
25362542
execSource();
25372543
};
2538-
var callNow = !this.debounceTimeout;
25392544
clearTimeout(this.debounceTimeout);
25402545
this.debounceTimeout = setTimeout(later, this.debounce);
2541-
if (callNow) {
2542-
execSource();
2543-
}
25442546
} else {
25452547
execSource();
25462548
}

dist/autocomplete.jquery.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/autocomplete.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3778,19 +3778,21 @@ return /******/ (function(modules) { // webpackBootstrap
37783778
handleSuggestions.apply(this, [this.cachedSuggestions].concat(this.cachedRenderExtraArgs));
37793779
} else {
37803780
var that = this;
3781-
var execSource = function() { that.source(query, handleSuggestions.bind(that)); };
3781+
var execSource = function() {
3782+
// When the call is debounced the condition avoid to do a useless
3783+
// request with the last character when the input has been cleared
3784+
if (!that.canceled) {
3785+
that.source(query, handleSuggestions.bind(that));
3786+
}
3787+
};
37823788

37833789
if (this.debounce) {
37843790
var later = function() {
37853791
that.debounceTimeout = null;
37863792
execSource();
37873793
};
3788-
var callNow = !this.debounceTimeout;
37893794
clearTimeout(this.debounceTimeout);
37903795
this.debounceTimeout = setTimeout(later, this.debounce);
3791-
if (callNow) {
3792-
execSource();
3793-
}
37943796
} else {
37953797
execSource();
37963798
}

dist/autocomplete.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)