forked from CGM_Public/pretix_original
Select2: add option to close when clearing selection (#3870)
This commit is contained in:
committed by
GitHub
parent
d5f9beef69
commit
7b5ce5e198
@@ -613,6 +613,13 @@ var form_handlers = function (el) {
|
|||||||
}, 50);
|
}, 50);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if ($s[0].hasAttribute("data-close-on-clear")) {
|
||||||
|
$s.on("select2:clear", function () {
|
||||||
|
window.setTimeout(function () {
|
||||||
|
$s.select2('close');
|
||||||
|
}, 50);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
el.find('[data-model-select2=event]').each(function () {
|
el.find('[data-model-select2=event]').each(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user