mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +00:00
Fix Calendar Title from not removing (#7058)
This commit is contained in:
parent
24b390ba03
commit
76db64c073
@ -1,29 +1,29 @@
|
|||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
internalProperty,
|
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
import {
|
||||||
|
array,
|
||||||
|
assert,
|
||||||
|
boolean,
|
||||||
|
object,
|
||||||
|
optional,
|
||||||
|
string,
|
||||||
|
union,
|
||||||
|
} from "superstruct";
|
||||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||||
|
import "../../../../components/entity/ha-entities-picker";
|
||||||
import type { HomeAssistant } from "../../../../types";
|
import type { HomeAssistant } from "../../../../types";
|
||||||
import type { CalendarCardConfig } from "../../cards/types";
|
import type { CalendarCardConfig } from "../../cards/types";
|
||||||
import "../../components/hui-entity-editor";
|
import "../../components/hui-entity-editor";
|
||||||
import "../../../../components/entity/ha-entities-picker";
|
|
||||||
import "../../components/hui-theme-select-editor";
|
import "../../components/hui-theme-select-editor";
|
||||||
import type { LovelaceCardEditor } from "../../types";
|
import type { LovelaceCardEditor } from "../../types";
|
||||||
import type { EditorTarget, EntitiesEditorEvent } from "../types";
|
import type { EditorTarget, EntitiesEditorEvent } from "../types";
|
||||||
import { configElementStyle } from "./config-elements-style";
|
import { configElementStyle } from "./config-elements-style";
|
||||||
import {
|
|
||||||
string,
|
|
||||||
optional,
|
|
||||||
object,
|
|
||||||
boolean,
|
|
||||||
array,
|
|
||||||
union,
|
|
||||||
assert,
|
|
||||||
} from "superstruct";
|
|
||||||
|
|
||||||
const cardConfigStruct = object({
|
const cardConfigStruct = object({
|
||||||
type: string(),
|
type: string(),
|
||||||
@ -113,6 +113,7 @@ export class HuiCalendarCardEditor extends LitElement
|
|||||||
this._config = { ...this._config, entities: ev.detail.value };
|
this._config = { ...this._config, entities: ev.detail.value };
|
||||||
} else if (target.configValue) {
|
} else if (target.configValue) {
|
||||||
if (target.value === "") {
|
if (target.value === "") {
|
||||||
|
this._config = { ...this._config };
|
||||||
delete this._config[target.configValue!];
|
delete this._config[target.configValue!];
|
||||||
} else {
|
} else {
|
||||||
this._config = {
|
this._config = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user