Only trim input on blur for text based values (#7173)

Fixes #6672
This commit is contained in:
Rijk van Zanten
2021-08-04 01:14:15 +02:00
committed by GitHub
parent fe354dc4c7
commit c6aa8bdf16

View File

@@ -215,7 +215,7 @@ export default defineComponent({
}
function trimIfEnabled() {
if (props.modelValue && props.trim) {
if (props.modelValue && props.trim && ['string', 'text'].includes(props.type)) {
emit('update:modelValue', String(props.modelValue).trim());
}
}