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