File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
packages/coreui-vue/src/components/form Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ const CFormTextarea = defineComponent({
113113 'update:modelValue' ,
114114 ] ,
115115 setup ( props , { attrs, emit, slots } ) {
116+ const handleChange = ( event : InputEvent ) => {
117+ const target = event . target as HTMLInputElement
118+ emit ( 'change' , event )
119+ emit ( 'update:modelValue' , target . value )
120+ }
121+
116122 const handleInput = ( event : InputEvent ) => {
117123 const target = event . target as HTMLInputElement
118124 emit ( 'input' , event )
@@ -151,6 +157,7 @@ const CFormTextarea = defineComponent({
151157 'is-valid' : props . valid ,
152158 } ,
153159 ] ,
160+ onChange : ( event : InputEvent ) => handleChange ( event ) ,
154161 onInput : ( event : InputEvent ) => handleInput ( event ) ,
155162 ...( props . modelValue && { value : props . modelValue } ) ,
156163 } ,
You can’t perform that action at this time.
0 commit comments