mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +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}
|
||||
@input=${this._handleChange}
|
||||
.label=${this.label || ""}
|
||||
.prefix=${this.selector.text?.prefix}
|
||||
.suffix=${this.selector.text?.type === "password"
|
||||
? // reserve some space for the icon.
|
||||
html`<div style="width: 24px"></div>`
|
||||
|
@ -329,6 +329,7 @@ export interface StringSelector {
|
||||
| "time"
|
||||
| "datetime-local"
|
||||
| "color";
|
||||
prefix?: string;
|
||||
suffix?: string;
|
||||
autocomplete?: string;
|
||||
} | null;
|
||||
|
@ -122,7 +122,9 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
||||
{
|
||||
name: "id",
|
||||
selector: {
|
||||
text: {},
|
||||
text: {
|
||||
prefix: "script.",
|
||||
},
|
||||
},
|
||||
},
|
||||
] as const)
|
||||
|
Loading…
x
Reference in New Issue
Block a user