Add icons to column headers, click them to scroll to top
This commit is contained in:
parent
1f18cf97b5
commit
ac77170d19
4 changed files with 26 additions and 7 deletions
|
@ -5,15 +5,21 @@ import PureRenderMixin from 'react-addons-pure-render-mixin';
|
|||
const Column = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
type: React.PropTypes.string
|
||||
type: React.PropTypes.string,
|
||||
icon: React.PropTypes.string
|
||||
},
|
||||
|
||||
mixins: [PureRenderMixin],
|
||||
|
||||
handleHeaderClick () {
|
||||
let node = ReactDOM.findDOMNode(this);
|
||||
node.querySelector('.scrollable').scrollTo(0, 0);
|
||||
},
|
||||
|
||||
render () {
|
||||
return (
|
||||
<div style={{ width: '380px', flex: '0 0 auto', background: '#282c37', margin: '10px', marginRight: '0', display: 'flex', flexDirection: 'column' }}>
|
||||
<ColumnHeader type={this.props.type} />
|
||||
<ColumnHeader icon={this.props.icon} type={this.props.type} onClick={this.handleHeaderClick} />
|
||||
<StatusListContainer type={this.props.type} />
|
||||
</div>
|
||||
);
|
||||
|
|
Reference in a new issue