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:
parent
db5e947664
commit
69ef214c92
4
src/js/select2/data/ajax.js
vendored
4
src/js/select2/data/ajax.js
vendored
@ -80,7 +80,9 @@ define([
|
|||||||
|
|
||||||
callback(results);
|
callback(results);
|
||||||
}, function () {
|
}, function () {
|
||||||
// TODO: Handle AJAX errors
|
self.trigger('results:message', {
|
||||||
|
message: 'errorLoading'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
self._request = $request;
|
self._request = $request;
|
||||||
|
Loading…
Reference in New Issue
Block a user