1
0
mirror of synced 2024-11-29 08:06:03 +03:00

Display error message on AJAX errors

This display the `errorLoading` translation when there is an error
during the AJAX cycle. Previously we were just throwing these errors
out, now we are actually displaying an error message.

This closes https://github.com/select2/select2/issues/3501
This commit is contained in:
Kevin Brown 2016-01-04 20:07:37 -05:00
parent db5e947664
commit 69ef214c92

View File

@ -80,7 +80,9 @@ define([
callback(results);
}, function () {
// TODO: Handle AJAX errors
self.trigger('results:message', {
message: 'errorLoading'
});
});
self._request = $request;