去掉一些warning
This commit is contained in:
parent
cba52a4e11
commit
01b4ee4303
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -310,6 +310,8 @@ class Table extends Component {
|
|||
'or set `rowKey` to an unique primary key.'
|
||||
);
|
||||
return key;
|
||||
|
||||
|
||||
}
|
||||
|
||||
getExpandedRows() {
|
||||
|
|
|
@ -538,7 +538,7 @@ class TableHeader extends Component {
|
|||
return (
|
||||
<thead className={`${clsPrefix}-thead`} {...attr} data-theader-fixed='scroll' ref={_thead=>this._thead = _thead} >
|
||||
{rows.map((row, index) => (
|
||||
<tr style={rowStyle} className={(filterable && index == rows.length - 1)?'filterable':''}>
|
||||
<tr key={index} style={rowStyle} className={(filterable && index == rows.length - 1)?'filterable':''}>
|
||||
{row.map((da, columIndex, arr) => {
|
||||
let thHover = da.drgHover
|
||||
? ` ${clsPrefix}-thead th-drag-hover`
|
||||
|
@ -558,6 +558,7 @@ class TableHeader extends Component {
|
|||
//避免key为undefined
|
||||
// if(da.dataindex && da.key ===undefined ){
|
||||
keyTemp.key = da.key || da.dataindex || index+'-'+columIndex
|
||||
|
||||
// }
|
||||
if (filterable && index == rows.length - 1) {
|
||||
da.children = this.filterRenderType(
|
||||
|
@ -582,7 +583,6 @@ class TableHeader extends Component {
|
|||
thClassName += ` ${fixedStyle}`;
|
||||
if(!da.fixed){
|
||||
|
||||
// console.log(keyTemp.key);
|
||||
return (<th {...da} {...keyTemp} className={thClassName} data-th-fixed={da.fixed}
|
||||
data-line-key={da.key} data-line-index={columIndex} data-th-width={da.width} >
|
||||
{da.children}
|
||||
|
|
|
@ -162,7 +162,7 @@ class TableRow extends Component{
|
|||
const {
|
||||
clsPrefix, columns, record, height, visible, index,
|
||||
expandIconColumnIndex, expandIconAsCell, expanded, expandRowByClick,
|
||||
expandable, onExpand, needIndentSpaced, indent, indentSize,isHiddenExpandIcon,fixed,
|
||||
expandable, onExpand, needIndentSpaced, indent, indentSize,isHiddenExpandIcon,fixed,hoverKey
|
||||
} = this.props;
|
||||
let showSum = false;
|
||||
let { className } = this.props;
|
||||
|
@ -221,7 +221,6 @@ class TableRow extends Component{
|
|||
if (!visible) {
|
||||
style.display = 'none';
|
||||
}
|
||||
|
||||
return (
|
||||
<tr
|
||||
onClick={this.onRowClick}
|
||||
|
@ -230,6 +229,7 @@ class TableRow extends Component{
|
|||
onMouseLeave={this.onMouseLeave}
|
||||
className={`${clsPrefix} ${className} ${clsPrefix}-level-${indent}`}
|
||||
style={style}
|
||||
// key={hoverKey}
|
||||
ref={this.bindElement}
|
||||
>
|
||||
{cells.length>0?cells:<td></td>}
|
||||
|
|
Loading…
Reference in New Issue