mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix history issue when closing more info dialog by clicking update (#17257)
* Fix history issue when closing more info dialog by clicking update * Remove hideMoreInfoDialog function
This commit is contained in:
parent
33b9786ae7
commit
606b96f6fd
@ -5,6 +5,3 @@ export const showMoreInfoDialog = (
|
||||
element: HTMLElement,
|
||||
params: MoreInfoDialogParams
|
||||
) => fireEvent(element, "hass-more-info", params);
|
||||
|
||||
export const hideMoreInfoDialog = (element: HTMLElement) =>
|
||||
fireEvent(element, "hass-more-info", { entityId: null });
|
||||
|
@ -16,7 +16,6 @@ import {
|
||||
} from "../../../../../data/entity_registry";
|
||||
import { HELPERS_CRUD } from "../../../../../data/helpers_crud";
|
||||
import { showConfirmationDialog } from "../../../../../dialogs/generic/show-dialog-box";
|
||||
import { hideMoreInfoDialog } from "../../../../../dialogs/more-info/show-ha-more-info-dialog";
|
||||
import { haStyle } from "../../../../../resources/styles";
|
||||
import type { HomeAssistant } from "../../../../../types";
|
||||
import type { Helper } from "../../../helpers/const";
|
||||
@ -151,7 +150,7 @@ export class EntityRegistrySettingsHelper extends LitElement {
|
||||
}
|
||||
const result = await this._registryEditor!.updateEntry();
|
||||
if (result.close) {
|
||||
hideMoreInfoDialog(this);
|
||||
fireEvent(this, "close-dialog");
|
||||
}
|
||||
} catch (err: any) {
|
||||
this._error = err.message || "Unknown error";
|
||||
|
@ -22,7 +22,6 @@ import {
|
||||
showAlertDialog,
|
||||
showConfirmationDialog,
|
||||
} from "../../../dialogs/generic/show-dialog-box";
|
||||
import { hideMoreInfoDialog } from "../../../dialogs/more-info/show-ha-more-info-dialog";
|
||||
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
||||
import { haStyle } from "../../../resources/styles";
|
||||
import type { HomeAssistant } from "../../../types";
|
||||
@ -200,7 +199,7 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
|
||||
try {
|
||||
const result = await this._registryEditor!.updateEntry();
|
||||
if (result.close) {
|
||||
hideMoreInfoDialog(this);
|
||||
fireEvent(this, "close-dialog");
|
||||
}
|
||||
} catch (err: any) {
|
||||
this._error = err.message || "Unknown error";
|
||||
|
@ -55,10 +55,7 @@ import {
|
||||
showAlertDialog,
|
||||
showConfirmationDialog,
|
||||
} from "../../../dialogs/generic/show-dialog-box";
|
||||
import {
|
||||
hideMoreInfoDialog,
|
||||
showMoreInfoDialog,
|
||||
} from "../../../dialogs/more-info/show-ha-more-info-dialog";
|
||||
import { showMoreInfoDialog } from "../../../dialogs/more-info/show-ha-more-info-dialog";
|
||||
import "../../../layouts/hass-loading-screen";
|
||||
import "../../../layouts/hass-tabs-subpage-data-table";
|
||||
import type { HaTabsSubpageDataTable } from "../../../layouts/hass-tabs-subpage-data-table";
|
||||
@ -487,11 +484,6 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
||||
];
|
||||
}
|
||||
|
||||
public disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
hideMoreInfoDialog(this);
|
||||
}
|
||||
|
||||
protected render() {
|
||||
if (!this.hass || this._entities === undefined) {
|
||||
return html` <hass-loading-screen></hass-loading-screen> `;
|
||||
|
Loading…
x
Reference in New Issue
Block a user