Skip to content

Commit dcb0f74

Browse files
committedAug 5, 2016
MEMO edit height bug fix
1 parent 3bbc5d8 commit dcb0f74

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/components/Memo.js

+6
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ class Memo extends React.Component {
4545
$('#dropdown-button-'+this.props.data._id).dropdown({
4646
belowOrigin: true // Displays dropdown below the button
4747
});
48+
49+
if(this.state.editMode) {
50+
// Trigger key up event to the edit input so that it auto-resizes (Materializecss Feature)
51+
$(this.input).keyup();
52+
}
4853
}
4954

5055
toggleEdit() {
@@ -132,6 +137,7 @@ class Memo extends React.Component {
132137
<div className="card">
133138
<div className="card-content">
134139
<textarea
140+
ref={ ref => { this.input = ref; } }
135141
className="materialize-textarea"
136142
value={this.state.value}
137143
onChange={this.handleChange}></textarea>

0 commit comments

Comments
 (0)
Please sign in to comment.