mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-29 10:50:03 +02:00
Be implicit with loading state calls
This commit is contained in:
parent
dc94ff9ded
commit
54510a2671
|
@ -833,7 +833,7 @@ export default class Choices {
|
||||||
if (this.initialised === true) {
|
if (this.initialised === true) {
|
||||||
if (this.passedElement.type === 'select-one' || this.passedElement.type === 'select-multiple') {
|
if (this.passedElement.type === 'select-one' || this.passedElement.type === 'select-multiple') {
|
||||||
// Show loading text
|
// Show loading text
|
||||||
this._handleLoadingState();
|
this._handleLoadingState(true);
|
||||||
// Run callback
|
// Run callback
|
||||||
fn(this._ajaxCallback());
|
fn(this._ajaxCallback());
|
||||||
}
|
}
|
||||||
|
@ -1327,7 +1327,7 @@ export default class Choices {
|
||||||
// If backspace or delete key is pressed and the input has no value
|
// If backspace or delete key is pressed and the input has no value
|
||||||
if (hasFocusedInput && !e.target.value && this.passedElement.type !== 'select-one') {
|
if (hasFocusedInput && !e.target.value && this.passedElement.type !== 'select-one') {
|
||||||
this._handleBackspace(activeItems);
|
this._handleBackspace(activeItems);
|
||||||
this._handleLoadingState();
|
this._handleLoadingState(false);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue