Allow Markdown and description placeholder usage in data field descriptions (#13377)

Co-authored-by: Zack Barett <zackbarett@hey.com>
This commit is contained in:
Franck Nijhof
2022-08-13 20:57:28 +02:00
committed by GitHub
parent 38607a6410
commit 651cafc464
5 changed files with 22 additions and 10 deletions

View File

@@ -10,12 +10,12 @@ import {
} from "lit";
import { customElement, property, state } from "lit/decorators";
import { fireEvent } from "../../common/dom/fire_event";
import "../../components/ha-alert";
import "../../components/ha-circular-progress";
import { computeInitialHaFormData } from "../../components/ha-form/compute-initial-ha-form-data";
import type { HaFormSchema } from "../../components/ha-form/types";
import "../../components/ha-form/ha-form";
import type { HaFormSchema } from "../../components/ha-form/types";
import "../../components/ha-markdown";
import "../../components/ha-alert";
import type { DataEntryFlowStepForm } from "../../data/data_entry_flow";
import type { HomeAssistant } from "../../types";
import type { FlowConfig } from "./show-dialog-data-entry-flow";
@@ -167,7 +167,7 @@ class StepFlowForm extends LitElement {
private _labelCallback = (field: HaFormSchema): string =>
this.flowConfig.renderShowFormStepFieldLabel(this.hass, this.step, field);
private _helperCallback = (field: HaFormSchema): string =>
private _helperCallback = (field: HaFormSchema): string | TemplateResult =>
this.flowConfig.renderShowFormStepFieldHelper(this.hass, this.step, field);
private _errorCallback = (error: string) =>