When adding a set to a collection and searching for the ID or name in the list, if the ID/name doesn't exist, a generic "No results found" appears. A more specific error would be better.
When trying to address this (e.g. with the code block below):
If a document ready function is added, the placeholder text is shown, but the results always show "Results could not be loaded", even if there should be results
If there is no document ready function, no placeholder text is shown and no custom noResults message appears (works as normal if there are results)
To be enhanced in a future version.
if (window.location.pathname === '/add-set/') {
$(document).ready(function () {
$('#id_set').select2({
placeholder: "Search set number or name",
language: {
noResults: function () {
console.log('test')
return $("testing");
}
}
});
});
}
When adding a set to a collection and searching for the ID or name in the list, if the ID/name doesn't exist, a generic "No results found" appears. A more specific error would be better.
When trying to address this (e.g. with the code block below):
To be enhanced in a future version.
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.8/js/select2.min.js"></script>