2015-06-05 11:06:36 +02:00
|
|
|
'use strict';
|
|
|
|
|
2015-06-01 14:10:11 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
|
|
|
|
let TableItemCheckbox = React.createClass({
|
|
|
|
propTypes: {
|
|
|
|
editionId: React.PropTypes.number,
|
|
|
|
pieceId: React.PropTypes.number,
|
|
|
|
selectItem: React.PropTypes.func,
|
|
|
|
selected: React.PropTypes.bool
|
|
|
|
},
|
|
|
|
|
|
|
|
selectItem() {
|
|
|
|
this.props.selectItem(this.props.pieceId, this.props.editionId);
|
|
|
|
},
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2015-06-12 13:36:55 +02:00
|
|
|
<span>
|
|
|
|
<input type="checkbox" onChange={this.selectItem} checked={this.props.selected}/>
|
|
|
|
</span>
|
2015-06-01 14:10:11 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default TableItemCheckbox;
|