mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Fix multi select ha-form (#10585)
This commit is contained in:
parent
b74fc5578d
commit
00299bc74d
@ -52,7 +52,9 @@ export class HaFormMultiSelect extends LitElement implements HaFormElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
const options = Object.entries(this.schema.options);
|
const options = Array.isArray(this.schema.options)
|
||||||
|
? this.schema.options
|
||||||
|
: Object.entries(this.schema.options);
|
||||||
const data = this.data || [];
|
const data = this.data || [];
|
||||||
|
|
||||||
const renderedOptions = options.map((item: string | [string, string]) => {
|
const renderedOptions = options.map((item: string | [string, string]) => {
|
||||||
|
@ -38,7 +38,7 @@ export interface HaFormSelectSchema extends HaFormBaseSchema {
|
|||||||
|
|
||||||
export interface HaFormMultiSelectSchema extends HaFormBaseSchema {
|
export interface HaFormMultiSelectSchema extends HaFormBaseSchema {
|
||||||
type: "multi_select";
|
type: "multi_select";
|
||||||
options: Record<string, string>;
|
options: Record<string, string> | string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HaFormFloatSchema extends HaFormBaseSchema {
|
export interface HaFormFloatSchema extends HaFormBaseSchema {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user