Fix checkboxes are not updated when calling typedInput("value", "")

This commit is contained in:
GogoVega 2024-05-27 18:59:25 +02:00
parent da97c5d558
commit 67cdf3ef96
No known key found for this signature in database
GPG Key ID: E1E048B63AC5AC2B

View File

@ -830,7 +830,13 @@
this.input.trigger('change',[this.propertyType,this.value()]);
}
} else {
this.optionSelectLabel.text(o.length+" selected");
this.optionSelectLabel.text(o.length + " selected");
if (this.optionMenu) {
this.optionMenu.find('input[type="checkbox"]').prop("checked", false);
for (const selectedOption of (this.value()?.split(",") || [])) {
this.optionMenu.find("[value='" + selectedOption + "']").find("input").prop("checked", true);
}
}
}
}
},