Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4853f41

Browse filesBrowse files
committed
fix(CFormTextarea): add change event handler
1 parent f389e6d commit 4853f41
Copy full SHA for 4853f41

File tree

1 file changed

+7
-0
lines changed
Filter options

1 file changed

+7
-0
lines changed

‎packages/coreui-vue/src/components/form/CFormTextarea.ts

Copy file name to clipboardExpand all lines: packages/coreui-vue/src/components/form/CFormTextarea.ts
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.