1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-15 07:25:54 +00:00

Fix custom value in picker with sections (#29593)

This commit is contained in:
Paul Bottein
2026-02-13 16:24:40 +01:00
committed by GitHub
parent 309e60fc4f
commit 67e3eeb45e

View File

@@ -362,6 +362,18 @@ export class HaPickerComboBox extends ScrollableFadeMixin(LitElement) {
const additionalItems = this._getAdditionalItems();
items.push(...additionalItems);
if (this.allowCustomValue && this._search) {
items.push({
id: this._search,
primary:
this.customValueLabel ??
this.hass?.localize("ui.components.combo-box.add_custom_item") ??
"Add custom item",
secondary: `"${this._search}"`,
icon_path: mdiPlus,
});
}
if (this.mode === "dialog") {
items.push({ id: PADDING_ID, primary: "" }); // padding for safe area inset
}