Merge pull request #4729 from GogoVega/fix-4728

Fix checkboxes are not updated when calling `typedInput("value", "")`
This commit is contained in:
Nick O'Leary 2024-05-30 10:32:27 +01:00 committed by GitHub
commit e408c6b376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -734,12 +734,12 @@
}
if (menu.opts.multiple) {
var selected = {};
this.value().split(",").forEach(function(f) {
selected[f] = true;
})
this.value().split(",").forEach(function(f) {
selected[f] = true;
});
menu.find('input[type="checkbox"]').each(function() {
$(this).prop("checked",selected[$(this).data('value')])
})
$(this).prop("checked", selected[$(this).data('value')] || false);
});
}