mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 20:36:35 +00:00
Revert "handle ha-radio and ha-checkbox in ha-formfield" (#10863)
This commit is contained in:
parent
bec5c564b6
commit
585648ac4c
@ -5,22 +5,6 @@ import { customElement } from "lit/decorators";
|
|||||||
@customElement("ha-formfield")
|
@customElement("ha-formfield")
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
export class HaFormfield extends Formfield {
|
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 {
|
protected static get styles(): CSSResultGroup {
|
||||||
return [
|
return [
|
||||||
Formfield.styles,
|
Formfield.styles,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user