10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 05:43:46 +01:00

trigger("change") only at the end and if realy change to optimize performances

This commit is contained in:
Mickaël Véril 2020-02-15 11:24:24 +01:00
parent e75a1de542
commit 42a9a35675

View File

@ -4,9 +4,12 @@ function selectSelectAll_click(e) {
} }
function selectSelectAll(target) { function selectSelectAll(target) {
if (target.prop('type') == 'select-multiple') { if (target.prop('type') == 'select-multiple') {
const old=target.val()
target.find("option").each(function () { target.find("option").each(function () {
$(this).prop('selected', true); $(this).prop('selected', true);
target.trigger("change")
}); });
if (old!==target.val()) {
target.trigger("change")
}
} }
} }