Skip to content

Commit

Permalink
MEMO edit height bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
velopert committed Aug 5, 2016
1 parent 3bbc5d8 commit dcb0f74
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Memo.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ class Memo extends React.Component {
$('#dropdown-button-'+this.props.data._id).dropdown({
belowOrigin: true // Displays dropdown below the button
});

if(this.state.editMode) {
// Trigger key up event to the edit input so that it auto-resizes (Materializecss Feature)
$(this.input).keyup();
}
}

toggleEdit() {
Expand Down Expand Up @@ -132,6 +137,7 @@ class Memo extends React.Component {
<div className="card">
<div className="card-content">
<textarea
ref={ ref => { this.input = ref; } }
className="materialize-textarea"
value={this.state.value}
onChange={this.handleChange}></textarea>
Expand Down

0 comments on commit dcb0f74

Please sign in to comment.