mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-15 19:20:47 +01:00
Et2CheckboxReadonly: Fix checkbox was not visible if selectedValue attribute was not set
This commit is contained in:
parent
e775493ee6
commit
f8e52f1115
@ -57,7 +57,11 @@ export class Et2CheckboxReadonly extends Et2InputWidget(LitElement) implements e
|
||||
|
||||
render()
|
||||
{
|
||||
const isChecked = this.checked || typeof this.selectedValue == "string" && this.value == this.selectedValue;
|
||||
const isChecked = this.checked ||
|
||||
// selectedValue is set, so only a value matching that counts as checked
|
||||
typeof this.selectedValue == "string" && this.value == this.selectedValue ||
|
||||
// selectedValue is not set, any truthy value counts as checked
|
||||
typeof this.selectedValue === "undefined" && this.value;
|
||||
let check = "";
|
||||
|
||||
if(isChecked && this.roTrue)
|
||||
|
Loading…
Reference in New Issue
Block a user