-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] Element UI Table Column that uses slot-scope Issue “Cannot read property 'column_name' of undefined” #14303
Comments
I have the same problem after upgrading to Vue 2.6.2. My workaround is to add a v-if around the cell content: https://jsfiddle.net/xuo0hkfv/ |
I have same problem with Vue 2.6.2 |
I have the same issue after updating. Not perfect, but it works. Not sure this is a Element UI problem tho. It might be something with vue. |
@sigfriedseldeslachts |
The problem is if we already have lots of tables and cells that need updating. I downgraded the vuejs to 2.5.4, which is the last working version after I updated the packages. Now everything's back to normal. The best thing to do I guess is to just wait on the next update of element -ui. |
@japhfortin Agreed. It turns out that the slot-scope is deprecated in the latest release from Vue 2.6#slot-scope,scope as well,which was replaced with a new directive v-slot. It caused me so much trouble like lots of "undefined"s and column misplacement in the Table component that I had to rollback to Vue 2.5.22. As for the temporary solutions mentioned above,I'm afraid adding those conditional operator to each column of all tables in all pages won't be much of a good idea. Tried to fix some column with the new directive v-slot and failed.The Table component is most likely rendered before the v-slot is even compiled,reading properties from a yet undefined scope,hence the "undefined" errors. Could this mean the v-slot is faster than slot-scope? :D Anyway,the upcoming update of element-ui should fix this problem,but before that,stay on Vue 2.5.x ;) |
Problem fix in vue 2.6.3. |
Element UI version
2.5.4
OS/Browsers version
Win10
Vue version
2.6.2
Reproduction Link
https://jsfiddle.net/japhfortin/jkzma0v8/3/
Steps to reproduce
What is Expected?
No error on the console
What is actually happening?
Error in the console says:
[Vue warn]: Error in render: "TypeError: Cannot read property 'column_name' of undefined"
The text was updated successfully, but these errors were encountered: