mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Add prefix support to text selector (#17335)
This commit is contained in:
parent
d7e58a00ca
commit
bc3295d851
@ -65,6 +65,7 @@ export class HaTextSelector extends LitElement {
|
|||||||
.type=${this._unmaskedPassword ? "text" : this.selector.text?.type}
|
.type=${this._unmaskedPassword ? "text" : this.selector.text?.type}
|
||||||
@input=${this._handleChange}
|
@input=${this._handleChange}
|
||||||
.label=${this.label || ""}
|
.label=${this.label || ""}
|
||||||
|
.prefix=${this.selector.text?.prefix}
|
||||||
.suffix=${this.selector.text?.type === "password"
|
.suffix=${this.selector.text?.type === "password"
|
||||||
? // reserve some space for the icon.
|
? // reserve some space for the icon.
|
||||||
html`<div style="width: 24px"></div>`
|
html`<div style="width: 24px"></div>`
|
||||||
|
@ -329,6 +329,7 @@ export interface StringSelector {
|
|||||||
| "time"
|
| "time"
|
||||||
| "datetime-local"
|
| "datetime-local"
|
||||||
| "color";
|
| "color";
|
||||||
|
prefix?: string;
|
||||||
suffix?: string;
|
suffix?: string;
|
||||||
autocomplete?: string;
|
autocomplete?: string;
|
||||||
} | null;
|
} | null;
|
||||||
|
@ -122,7 +122,9 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
{
|
{
|
||||||
name: "id",
|
name: "id",
|
||||||
selector: {
|
selector: {
|
||||||
text: {},
|
text: {
|
||||||
|
prefix: "script.",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
] as const)
|
] as const)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user