Fix Calendar Title from not removing (#7058)

This commit is contained in:
Zack Barett 2020-09-21 06:27:50 -05:00 committed by GitHub
parent 24b390ba03
commit 76db64c073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,29 +1,29 @@
import {
customElement,
html,
internalProperty,
LitElement,
property,
TemplateResult,
internalProperty,
} from "lit-element";
import {
array,
assert,
boolean,
object,
optional,
string,
union,
} from "superstruct";
import { fireEvent } from "../../../../common/dom/fire_event";
import "../../../../components/entity/ha-entities-picker";
import type { HomeAssistant } from "../../../../types";
import type { CalendarCardConfig } from "../../cards/types";
import "../../components/hui-entity-editor";
import "../../../../components/entity/ha-entities-picker";
import "../../components/hui-theme-select-editor";
import type { LovelaceCardEditor } from "../../types";
import type { EditorTarget, EntitiesEditorEvent } from "../types";
import { configElementStyle } from "./config-elements-style";
import {
string,
optional,
object,
boolean,
array,
union,
assert,
} from "superstruct";
const cardConfigStruct = object({
type: string(),
@ -113,6 +113,7 @@ export class HuiCalendarCardEditor extends LitElement
this._config = { ...this._config, entities: ev.detail.value };
} else if (target.configValue) {
if (target.value === "") {
this._config = { ...this._config };
delete this._config[target.configValue!];
} else {
this._config = {