diff --git a/build/Table.js b/build/Table.js index 87fa58e..4ec0174 100644 --- a/build/Table.js +++ b/build/Table.js @@ -304,7 +304,7 @@ var Table = function (_Component) { e.preventDefault(); e.stopPropagation(); } - var info = this.findExpandedRow(record); + var info = this.findExpandedRow(record, index); if (typeof info !== 'undefined' && !expanded) { this.onRowDestroy(record, index); } else if (!info && expanded) { @@ -923,7 +923,7 @@ var Table = function (_Component) { //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 i === _this4.getRowKey(record, index) || item === _this4.getRowKey(record, index); }); return rows[0]; }; diff --git a/src/Table.js b/src/Table.js index 113af1b..d04f5f5 100644 --- a/src/Table.js +++ b/src/Table.js @@ -228,7 +228,7 @@ class Table extends Component { e.preventDefault(); e.stopPropagation(); } - const info = this.findExpandedRow(record); + const info = this.findExpandedRow(record, index); if (typeof info !== 'undefined' && !expanded) { this.onRowDestroy(record, index); } else if (!info && expanded) { @@ -806,7 +806,7 @@ class Table extends Component { //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 i === this.getRowKey(record, index) || item === this.getRowKey(record, index) }); return rows[0]; }