File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/packages/property-editors/number Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,15 @@ export class UmbPropertyEditorUINumberElement extends UmbLitElement implements U
9
9
@property ( { type : Number } )
10
10
value ?: number ;
11
11
12
+ /**
13
+ * Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content.
14
+ * @type {boolean }
15
+ * @attr
16
+ * @default false
17
+ */
18
+ @property ( { type : Boolean , reflect : true } )
19
+ readonly = false ;
20
+
12
21
@state ( )
13
22
private _max ?: number ;
14
23
@@ -48,7 +57,8 @@ export class UmbPropertyEditorUINumberElement extends UmbLitElement implements U
48
57
step= ${ ifDefined ( this . _step ) }
49
58
placeholder= ${ ifDefined ( this . _placeholder ) }
50
59
.value = ${ this . value ?? ( this . _placeholder ? undefined : 0 ) }
51
- @input = ${ this . #onInput} >
60
+ @input = ${ this . #onInput}
61
+ ?readonly = ${ this . readonly } >
52
62
</ uui- input>
53
63
` ;
54
64
}
You can’t perform that action at this time.
0 commit comments