mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-30 04:36:36 +00:00
Fix: View should have cards (#2184)
* View should have cards * Don't need CardConfig yet
This commit is contained in:
parent
bfef3a96c8
commit
3f113da056
@ -78,8 +78,8 @@ export class HuiEditView extends hassLocalizeLitMixin(LitElement) {
|
|||||||
(changedProperties.get("viewConfig") as LovelaceViewConfig).id)
|
(changedProperties.get("viewConfig") as LovelaceViewConfig).id)
|
||||||
) {
|
) {
|
||||||
const { cards, badges, ...viewConfig } = this.viewConfig;
|
const { cards, badges, ...viewConfig } = this.viewConfig;
|
||||||
this._badges = processEditorEntities(badges);
|
|
||||||
this._config = viewConfig;
|
this._config = viewConfig;
|
||||||
|
this._badges = processEditorEntities(badges);
|
||||||
} else if (changedProperties.has("add")) {
|
} else if (changedProperties.has("add")) {
|
||||||
this._config = {};
|
this._config = {};
|
||||||
this._badges = [];
|
this._badges = [];
|
||||||
@ -228,6 +228,7 @@ export class HuiEditView extends hassLocalizeLitMixin(LitElement) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.add) {
|
if (this.add) {
|
||||||
|
this._config.cards = [];
|
||||||
await addView(this.hass!, this._config, "json");
|
await addView(this.hass!, this._config, "json");
|
||||||
} else {
|
} else {
|
||||||
await updateViewConfig(
|
await updateViewConfig(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user