ElemeFE / ElemeFE/element

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

Open
#18,084 3 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### 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();`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.