解决demo13 key报错问题

This commit is contained in:
jonyshi 2019-03-19 15:51:23 +08:00
parent 12fc8fe084
commit 74dbebeba7
4 changed files with 4 additions and 7 deletions

View File

@ -637,7 +637,7 @@ class Table extends Component {
height={height}
isHiddenExpandIcon={isHiddenExpandIcon}
{...onHoverProps}
key={key}
key={"table_row_"+key+"_"+index}
hoverKey={key}
ref={rowRef}
store={this.store}

View File

@ -168,7 +168,6 @@ class TableRow extends Component{
} = this.props;
let showSum = false;
let { className } = this.props;
if (this.state.hovered) {
className += ` ${clsPrefix}-hover`;
}
@ -196,7 +195,7 @@ class TableRow extends Component{
cells.push(
<td
className={`${clsPrefix}-expand-icon-cell`}
key="rc-table-expand-icon-cell"
key={`rc-table-expand-icon-cell-${i}`}
>
{expandIcon}
</td>
@ -212,7 +211,7 @@ class TableRow extends Component{
indent={indent}
index={index}
column={columns[i]}
key={columns[i].key || columns[i].dataIndex || i}
key={index + "_"+(columns[i].key || columns[i].dataIndex || i)}
fixed= {fixed}
showSum={showSum}
expandIcon={(isColumnHaveExpandIcon) ? expandIcon : null}

View File

@ -1,5 +1,4 @@
import React, { Component } from "react";
// import Checkbox from 'bee-checkbox';
import {ObjectAssign} from './util';
/**
* 参数: 过滤表头
@ -11,7 +10,7 @@ import {ObjectAssign} from './util';
export default function multiSelect(Table, Checkbox) {
return class NewMultiSelect extends Component {
return class MultiSelect extends Component {
static defaultProps = {
prefixCls: "u-table-mult-select",
getSelectedDataFunc:()=>{}

View File

@ -1,5 +1,4 @@
import React, { Component } from "react";
// import Checkbox from 'bee-checkbox';
import {ObjectAssign} from './util';
/**
* 参数: 过滤表头