1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-25 23:23:21 -05:00

transaction register: Scroll on overflow of table, not whole pane

This commit is contained in:
Aaron Lindsay 2015-08-11 07:13:40 -04:00
parent 8ca68da816
commit 0d75a5e7f9
2 changed files with 10 additions and 3 deletions

View File

@ -302,7 +302,7 @@ const AccountRegister = React.createClass({
},
resize: function() {
var div = React.findDOMNode(this);
this.setState({height: div.parentElement.clientHeight - 30});
this.setState({height: div.parentElement.clientHeight - 64});
},
componentDidMount: function() {
this.resize();
@ -495,7 +495,9 @@ const AccountRegister = React.createClass({
));
}
var style = {height: this.state.height + "px"};
register = (
<div style={style} className="transactions-register">
<Table bordered striped condensed hover>
<thead><tr>
<th>Date</th>
@ -510,14 +512,14 @@ const AccountRegister = React.createClass({
{transactionRows}
</tbody>
</Table>
</div>
);
}
var style = {height: this.state.height + "px"};
var disabled = (this.props.selectedAccount == null) ? "disabled" : "";
return (
<div className="transactions-container" style={style}>
<div className="transactions-container">
<AddEditTransactionModal
show={this.state.editingTransaction}
transaction={this.state.selectedTransaction}

View File

@ -75,6 +75,11 @@ div.accounttree-root div {
display: block;
width: 100%;
height: 100%;
}
.transactions-register {
display: block;
width: 100%;
height: 100%;
overflow: auto;
}
.transactions-column {