ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.1k stars 14.64k forks source link

[Bug Report] Console error with multiselect table, rowKey and reserve-selection #18084

Open pixagraphic opened 4 years ago

pixagraphic commented 4 years ago

Element UI version

2.12.0

OS/Browsers version

Mac OSx 10.15.1, Firefox 70.0.1

Vue version

2.6.10

Reproduction Link

https://codepen.io/pixagraphic/pen/YzzdweK

Steps to reproduce

Simple create a multiselect table with :reserve-selection:="true" and required rowKey method. (see pen) Console will output an error TypeError: "data is null.

What is Expected?

Expected behaviour would be no console errors.

What is actually happening?

updateExpandRows() in "packages/table/src/store/expand.js" does not check if data is null. Statement if (!data) return; is required before this.states.expandRows = data.slice();

xrkffgg commented 4 years ago

There is no console error in Windows10 and Firefox 70.0.1

azhai commented 4 years ago

same as https://github.com/ElemeFE/element/issues/15183#issuecomment-508893460

vue.runtime.esm.js:619 [Vue warn]: Error in callback for immediate watcher "data": "TypeError: Cannot read property 'reduce' of null"

stale[bot] commented 3 years ago

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.