Element: [Bug Report] Autocomplete broken "Cannot read property 'value' of undefined"

Created on 12 May 2020  ·  5Comments  ·  Source: ElemeFE/element

Element UI version

2.13.1

OS/Browsers version

OS X 10.15.4 / Chrome 81

Vue version

2.6.11

Reproduction Link

https://codepen.io/corysimmons/pen/dyYKqed

Steps to reproduce

  1. Add any text to autocomplete field
  2. Unfocus autocomplete field
  3. Error is throw

What is Expected?

Error is not thrown.

What is actually happening?

Error is thrown.

Most helpful comment

👋🏻@corysimmons
It's already fixed (https://github.com/ElemeFE/element/issues/19243) and will be available on the next release.

All 5 comments

@corysimmons

I faced the same challenge.

It's strange because the component seems to work, but Nuxt throws a hard error.

at node_moduleselement-uilibelement-ui.common.js 2090th line

handleChange: function handleChange(event) {
this.$emit('change', event.target.value);
},
the event is only string rather than Object
it should be
handleChange: function handleChange(value) {
this.$emit('change', value);
},

👋🏻@corysimmons
It's already fixed (https://github.com/ElemeFE/element/issues/19243) and will be available on the next release.

Oof, I should've searched first. Thanks for the update!

Was this page helpful?
0 / 5 - 0 ratings