Skip to content
Snippets Groups Projects
Commit a0874240 authored by Chris Lawton's avatar Chris Lawton
Browse files

listen to select2 clear event so we can remove the is-active class

parent 6d0a518a
No related branches found
No related tags found
No related merge requests found
...@@ -44,4 +44,10 @@ $(function () { ...@@ -44,4 +44,10 @@ $(function () {
match[0].classList.remove('is-active'); match[0].classList.remove('is-active');
} }
}); });
// remove active class on clearing select2
$('.select2').on('select2:unselecting', (e) => {
const dropdown = e.target.nextElementSibling.firstChild.firstChild;
(dropdown.classList.contains('is-active')) ? dropdown.classList.remove('is-active') : null;
});
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment