bigData场景下事件中index值问题
This commit is contained in:
parent
c8963e3bdf
commit
615baf482d
|
@ -90,9 +90,7 @@ class Demo30 extends Component {
|
|||
scroll={{y:300}}
|
||||
height={40}
|
||||
onRowClick={(record, index, indent) => {
|
||||
this.setState({
|
||||
selectedRowIndex: index
|
||||
});
|
||||
console.log('currentIndex--'+index);
|
||||
}}
|
||||
/>
|
||||
|
||||
|
|
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
|
@ -567,7 +567,7 @@ class Table extends Component {
|
|||
record={record}
|
||||
expandIconAsCell={expandIconAsCell}
|
||||
onDestroy={this.onRowDestroy}
|
||||
index={fixedIndex}
|
||||
index={fixedIndex+lazyCurrentIndex}
|
||||
visible={visible}
|
||||
expandRowByClick={expandRowByClick}
|
||||
onExpand={this.onExpanded}
|
||||
|
|
|
@ -87,7 +87,7 @@ class TableRow extends Component{
|
|||
setRowHeight() {
|
||||
const { setRowHeight , expandedContentHeight=0,lazyCurrentIndex=0,fixed} = this.props
|
||||
if (!setRowHeight || !this.element || fixed) return
|
||||
setRowHeight(this.element.clientHeight + expandedContentHeight, this.props.index+lazyCurrentIndex)
|
||||
setRowHeight(this.element.clientHeight + expandedContentHeight, this.props.index)
|
||||
}
|
||||
|
||||
onRowClick(event) {
|
||||
|
@ -189,7 +189,7 @@ class TableRow extends Component{
|
|||
record={record}
|
||||
indentSize={indentSize}
|
||||
indent={indent}
|
||||
index={index+lazyCurrentIndex}
|
||||
index={index}
|
||||
column={columns[i]}
|
||||
key={columns[i].key}
|
||||
fixed= {fixed}
|
||||
|
|
Loading…
Reference in New Issue