Add multi select component to ha-form (#4247)

* Add multi select component

* Apply suggestions from code review

Co-Authored-By: Ian Richardson <iantrich@gmail.com>

* Comments

* update

* Fix

* Refactor to dropdown menu

Co-authored-by: Ian Richardson <iantrich@gmail.com>
This commit is contained in:
Bram Kragten
2020-02-17 14:13:09 +01:00
committed by GitHub
parent 24e4b0b772
commit 8f9a6bd544
6 changed files with 193 additions and 17 deletions

View File

@@ -18,8 +18,10 @@ import "../../resources/ha-style";
import { HomeAssistant } from "../../types";
import { fireEvent } from "../../common/dom/fire_event";
import { configFlowContentStyles } from "./styles";
import { DataEntryFlowStepForm, FieldSchema } from "../../data/data_entry_flow";
import { DataEntryFlowStepForm } from "../../data/data_entry_flow";
import { FlowConfig } from "./show-dialog-data-entry-flow";
// tslint:disable-next-line
import { HaFormSchema } from "../../components/ha-form/ha-form";
@customElement("step-flow-form")
class StepFlowForm extends LitElement {
@@ -176,7 +178,7 @@ class StepFlowForm extends LitElement {
this._stepData = ev.detail.value;
}
private _labelCallback = (field: FieldSchema): string =>
private _labelCallback = (field: HaFormSchema): string =>
this.flowConfig.renderShowFormStepFieldLabel(this.hass, this.step, field);
private _errorCallback = (error: string) =>