ElemeFE / ElemeFE/element

[Bug Report] table组件使用toggleRowSelection 出现的bug

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

Description

### Element UI version
2.15.14

### OS/Browsers version
chrome

### Vue version
2.7.16

### Reproduction Link
https://elementui.github.io/issue-generator/#/zh-CN

### Steps to reproduce
let changed = false;
const index = statusArr.indexOf(row); // 有问题判读啊 永远是-1
const included = index !== -1;
debugger;

const addRow = () => {
statusArr.push(row);
changed = true;
};
const removeRow = () => {
statusArr.splice(index, 1);
changed = true;
};

### What is Expected?
const index = JSON.stringify(statusArr).indexOf(row);

### What is actually happening?
永远都是-1

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.