10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-08-25 13:41:50 +02: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) {
if (target.prop('type') == 'select-multiple') {
const old=target.val()
target.find("option").each(function () {
$(this).prop('selected', true);
target.trigger("change")
});
if (old!==target.val()) {
target.trigger("change")
}
}
}