Hide messages when loading results
This closes https://github.com/select2/select2/issues/3343
This commit is contained in:
parent
b69dd827d0
commit
73e50ae92c
7
src/js/select2/results.js
vendored
7
src/js/select2/results.js
vendored
@ -48,9 +48,15 @@ define([
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$message[0].className += ' select2-results__message';
|
||||||
|
|
||||||
this.$results.append($message);
|
this.$results.append($message);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Results.prototype.hideMessages = function () {
|
||||||
|
this.$results.find('.select2-results__message').remove();
|
||||||
|
};
|
||||||
|
|
||||||
Results.prototype.append = function (data) {
|
Results.prototype.append = function (data) {
|
||||||
this.hideLoading();
|
this.hideLoading();
|
||||||
|
|
||||||
@ -250,6 +256,7 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
container.on('query', function (params) {
|
container.on('query', function (params) {
|
||||||
|
self.hideMessages();
|
||||||
self.showLoading(params);
|
self.showLoading(params);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user