element el-autocomplete input change return undefined

4jb9z9bj  于 5个月前  发布在  其他
关注(0)|答案(6)|浏览(62)

In the last version from element-ui@2.13.1 the component el-autocomplete have an issue when you type anything that is not in the suggestion list and change the focus or keyEnter

Replicate behaviour

  • Type a string that is not exist into the suggestion list.
  • Click on any part outside the input

Result:
TypeError: "e.target is undefined" ui 2.13.1/lib/index.js:1 VueJS 4 ui 2.13.1/lib/index.js:1 VueJS 3

make reference to the el-input component into the onChange method. this line
handleChange: function handleChange(event) { this.$emit('change', event.target.value); }

9o685dep

9o685dep1#

I face the same issue axactly!

blpfk2vs

blpfk2vs2#

Same.
Happend to me while moving to composition api.
versions:

"vue": "^2.6.11",
		"element-ui": "^2.13.1",
		"@vue/composition-api": "^0.5.0",
jm81lzqq

jm81lzqq3#

same problem today, make my day so bad

jutyujz0

jutyujz04#

I have the same issue

lp0sw83n

lp0sw83n5#

Element UI doesn't give a damn about the original Event instance, it only dispatches the value. That's why you don't have access to event.target

Solution: Uninstall ElementUI

q0qdq0h2

q0qdq0h26#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题