Include blueprint type in row id key (#16998)

This commit is contained in:
karwosts 2023-06-26 00:59:43 -07:00 committed by GitHub
parent 152ca75499
commit 655cf053c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,6 +96,7 @@ class HaBlueprintOverview extends LitElement {
type,
error: true,
path,
fullpath: `${type}/${path}`,
});
} else {
result.push({
@ -103,6 +104,7 @@ class HaBlueprintOverview extends LitElement {
type,
error: false,
path,
fullpath: `${type}/${path}`,
});
}
})
@ -154,6 +156,10 @@ class HaBlueprintOverview extends LitElement {
direction: "asc",
width: "25%",
},
fullpath: {
title: "fullpath",
hidden: true,
},
actions: {
title: "",
width: this.narrow ? undefined : "10%",
@ -233,7 +239,7 @@ class HaBlueprintOverview extends LitElement {
.tabs=${configSections.automations}
.columns=${this._columns(this.narrow, this.hass.language)}
.data=${this._processedBlueprints(this.blueprints)}
id="path"
id="fullpath"
.noDataText=${this.hass.localize(
"ui.panel.config.blueprint.overview.no_blueprints"
)}
@ -318,7 +324,7 @@ class HaBlueprintOverview extends LitElement {
private _handleRowClicked(ev: HASSDomEvent<RowClickedEvent>) {
const blueprint = this._processedBlueprints(this.blueprints).find(
(b) => b.path === ev.detail.id
(b) => b.fullpath === ev.detail.id
);
if (blueprint.error) {
showAlertDialog(this, {