1
0
mirror of synced 2024-12-02 01:26:02 +03:00

Hide messages when loading results

This closes https://github.com/select2/select2/issues/3343
This commit is contained in:
Kevin Brown 2015-08-21 20:49:01 -04:00
parent b69dd827d0
commit 73e50ae92c

View File

@ -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);
}); });