mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Add min/max support for prompt dialog (e.g. used for card moving) (#17085)
This commit is contained in:
parent
fc86c82540
commit
82cc667012
@ -81,6 +81,8 @@ class DialogBox extends LitElement {
|
||||
.type=${this._params.inputType
|
||||
? this._params.inputType
|
||||
: "text"}
|
||||
.min=${this._params.inputMin}
|
||||
.max=${this._params.inputMax}
|
||||
></ha-textfield>
|
||||
`
|
||||
: ""}
|
||||
|
@ -26,6 +26,8 @@ export interface PromptDialogParams extends BaseDialogBoxParams {
|
||||
placeholder?: string;
|
||||
confirm?: (out?: string) => void;
|
||||
cancel?: () => void;
|
||||
inputMin?: number | string;
|
||||
inputMax?: number | string;
|
||||
}
|
||||
|
||||
export interface DialogBoxParams
|
||||
|
@ -288,6 +288,7 @@ export class HuiCardOptions extends LitElement {
|
||||
"ui.panel.lovelace.editor.change_position.text"
|
||||
),
|
||||
inputType: "number",
|
||||
inputMin: "1",
|
||||
placeholder: String(path[1] + 1),
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user