Allow to disable a select option (#13618)

This commit is contained in:
Bram Kragten
2022-09-15 12:00:00 +02:00
committed by GitHub
parent 8c03bbdccc
commit ea319d55ef
4 changed files with 56 additions and 5 deletions

View File

@@ -13,6 +13,9 @@ export class HaFormfield extends FormfieldBase {
switch (input.tagName) {
case "HA-CHECKBOX":
case "HA-RADIO":
if ((input as any).disabled) {
break;
}
(input as any).checked = !(input as any).checked;
fireEvent(input, "change");
break;