还原示例
This commit is contained in:
parent
ae5663630f
commit
2ef7e05d90
|
@ -62,7 +62,7 @@ const columns = [
|
|||
}
|
||||
];
|
||||
|
||||
const data = [ ...new Array(20) ].map((e, i) => {
|
||||
const data = [ ...new Array(10000) ].map((e, i) => {
|
||||
const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };
|
||||
if(i%3==0){
|
||||
rs.b = '女';
|
||||
|
@ -80,18 +80,9 @@ class Demo30 extends Component {
|
|||
selectedRowIndex: 0
|
||||
}
|
||||
}
|
||||
add=()=>{
|
||||
let {data} = this.state;
|
||||
const len =data.length;
|
||||
data.push({a: len + 'a', b: len+ 'b', c: len + 'c', d: len + 'd', key: len });
|
||||
this.setState({
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<button onClick={this.add}>new</button>
|
||||
<BigDataTable
|
||||
columns={columns}
|
||||
data={data}
|
||||
|
@ -101,7 +92,7 @@ class Demo30 extends Component {
|
|||
console.log('currentIndex--'+index);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
|
|
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
Loading…
Reference in New Issue