1
0
mirror of synced 2024-11-26 06:46:04 +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);
};
Results.prototype.hideMessages = function () {
this.$results.find('.select2-results__message').remove();
};
Results.prototype.append = function (data) {
this.hideLoading();
@ -250,6 +256,7 @@ define([
});
container.on('query', function (params) {
self.hideMessages();
self.showLoading(params);
});