Revert "handle ha-radio and ha-checkbox in ha-formfield" (#10863)

This commit is contained in:
Joakim Sørensen 2021-12-11 08:30:35 +01:00 committed by GitHub
parent bec5c564b6
commit 585648ac4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,22 +5,6 @@ import { customElement } from "lit/decorators";
@customElement("ha-formfield")
// @ts-expect-error
export class HaFormfield extends Formfield {
protected _labelClick() {
const input = this.input;
if (input) {
input.focus();
switch (input.tagName) {
case "HA-CHECKBOX":
case "HA-RADIO":
(input as any).checked = !(input as any).checked;
break;
default:
input.click();
break;
}
}
}
protected static get styles(): CSSResultGroup {
return [
Formfield.styles,