1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-26 15:42:27 -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() { resize: function() {
var div = React.findDOMNode(this); var div = React.findDOMNode(this);
this.setState({height: div.parentElement.clientHeight - 30}); this.setState({height: div.parentElement.clientHeight - 64});
}, },
componentDidMount: function() { componentDidMount: function() {
this.resize(); this.resize();
@ -495,7 +495,9 @@ const AccountRegister = React.createClass({
)); ));
} }
var style = {height: this.state.height + "px"};
register = ( register = (
<div style={style} className="transactions-register">
<Table bordered striped condensed hover> <Table bordered striped condensed hover>
<thead><tr> <thead><tr>
<th>Date</th> <th>Date</th>
@ -510,14 +512,14 @@ const AccountRegister = React.createClass({
{transactionRows} {transactionRows}
</tbody> </tbody>
</Table> </Table>
</div>
); );
} }
var style = {height: this.state.height + "px"};
var disabled = (this.props.selectedAccount == null) ? "disabled" : ""; var disabled = (this.props.selectedAccount == null) ? "disabled" : "";
return ( return (
<div className="transactions-container" style={style}> <div className="transactions-container">
<AddEditTransactionModal <AddEditTransactionModal
show={this.state.editingTransaction} show={this.state.editingTransaction}
transaction={this.state.selectedTransaction} transaction={this.state.selectedTransaction}

View File

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