Change select2 to 4.0.13 and fix autofocus. Other minor cosmetic fix

This commit is contained in:
Deon George
2021-10-19 22:38:52 +11:00
parent 30fd916646
commit 3adf7c73b6
5 changed files with 20 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
$(document).on('select2:open',(event) => {
const searchField = document.querySelector(
`.select2-search__field[aria-controls="select2-${event.target.getAttribute('data-select2-id')}-results"]`,
);
if (searchField) {
searchField.focus();
}
});