| | |
| | | |
| | | class BodyRow extends React.Component { |
| | | shouldComponentUpdate (nextProps) { |
| | | return this.props.className !== nextProps.className |
| | | return !is(fromJS(this.props.record), fromJS(nextProps.record)) || this.props.className !== nextProps.className |
| | | } |
| | | |
| | | render() { |
| | | return <tr {...this.props}/> |
| | | const { record, ...resProps } = this.props |
| | | return <tr {...resProps}/> |
| | | } |
| | | } |
| | | |
| | |
| | | loading={this.props.loading} |
| | | scroll={{ x: '100%', y: height }} |
| | | onRow={(record, index) => { |
| | | return { |
| | | onClick: () => {this.changeRow(record, index)}, |
| | | onDoubleClick: () => {this.doubleClickLine(record)} |
| | | if (setting.tableMode === 'fast') { |
| | | return { |
| | | record, |
| | | onClick: () => {this.changeRow(record, index)}, |
| | | onDoubleClick: () => {this.doubleClickLine(record)} |
| | | } |
| | | } else { |
| | | return { |
| | | onClick: () => {this.changeRow(record, index)}, |
| | | onDoubleClick: () => {this.doubleClickLine(record)} |
| | | } |
| | | } |
| | | }} |
| | | onChange={this.changeTable} |