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:
parent
e75a1de542
commit
42a9a35675
@ -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")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user