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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user