bugfix:修复rowKey传递参数不正确的问题
This commit is contained in:
parent
77fce73e59
commit
872c3f8bbb
|
@ -250,7 +250,7 @@
|
|||
.u-table-row-expand-icon, .u-table-expanded-row-expand-icon {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
margin-right: 0px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
text-align: center;
|
||||
|
|
|
@ -920,8 +920,10 @@ var Table = function (_Component) {
|
|||
Table.prototype.findExpandedRow = function findExpandedRow(record, index) {
|
||||
var _this4 = this;
|
||||
|
||||
var rows = this.getExpandedRows().filter(function (i) {
|
||||
return i === _this4.getRowKey(record, index);
|
||||
//const rows = this.getExpandedRows().filter(i => i === this.getRowKey(record, index));
|
||||
//修复rowKey index问题 By Kvkens 2018-10-24 13:38:38
|
||||
var rows = this.getExpandedRows().filter(function (item, i) {
|
||||
i === _this4.getRowKey(record, index) || item === _this4.getRowKey(record, index);
|
||||
});
|
||||
return rows[0];
|
||||
};
|
||||
|
|
|
@ -803,7 +803,11 @@ class Table extends Component {
|
|||
}
|
||||
|
||||
findExpandedRow(record, index) {
|
||||
const rows = this.getExpandedRows().filter(i => i === this.getRowKey(record, index));
|
||||
//const rows = this.getExpandedRows().filter(i => i === this.getRowKey(record, index));
|
||||
//修复rowKey index问题 By Kvkens 2018-10-24 13:38:38
|
||||
const rows = this.getExpandedRows().filter((item, i) => {
|
||||
i === this.getRowKey(record, index) || item === this.getRowKey(record, index)
|
||||
});
|
||||
return rows[0];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue