File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,15 @@ export class UUIRadioElement extends LitElement {
81
81
}
82
82
private _disabled = false ;
83
83
84
+ /**
85
+ * Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content.
86
+ * @type {boolean }
87
+ * @attr
88
+ * @default false
89
+ */
90
+ @property ( { type : Boolean , reflect : true } )
91
+ readonly = false ;
92
+
84
93
constructor ( ) {
85
94
super ( ) ;
86
95
this . addEventListener ( 'mousedown' , this . #hideFocusOutline) ;
@@ -162,7 +171,7 @@ export class UUIRadioElement extends LitElement {
162
171
name = ${ this . name }
163
172
value= ${ this . value }
164
173
.checked = ${ this . checked }
165
- .disabled = ${ this . disabled }
174
+ .disabled = ${ this . disabled || this . readonly }
166
175
@change = ${ this . _onChange } / >
167
176
<div id= "button" > </ div>
168
177
<div id= "label" >
You can’t perform that action at this time.
0 commit comments