You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
textFieldInput(event) {
let value = event.target.value
if (event.inputType === 'insertFromPaste') {
event.preventDefault()
value = value.replace(...)
// this.$refs.textField.$refs.input.value = value
}
this.$emit('input', value) // Cancels the above event.preventDefault()
}
What does the proposed API look like?
Just use a different name for the event
textFieldInput(event) {
let value = event.target.value
if (event.inputType === 'insertFromPaste') {
event.preventDefault()
value = value.replace(...)
// this.$refs.textField.$refs.input.value = value
this.$emit('input-paste', value)
} else {
this.$emit('input', value)
}
}
<CustomTextField
v-model="value"
@input-paste="_value => value = _value"
/>
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
I believe this behavior should be mentioned in the docs.
What does the proposed API look like?
Just use a different name for the event
The text was updated successfully, but these errors were encountered: