Skip to content

Commit

Permalink
fix(comment-input): Fix the input text being chopped up (#622)
Browse files Browse the repository at this point in the history
* fix(comment-input): Fix the input text being chopped up

Closes #536

* fix: Rename variable
  • Loading branch information
machour authored and Houssein Djirdeh committed Nov 9, 2017
1 parent 4515c1f commit e3e5a7f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/comment-input.component.js
Expand Up @@ -41,6 +41,11 @@ const PostButtonIcon = styled(Icon).attrs({
color: props => (props.disabled ? colors.grey : colors.primaryDark),
})``;

const inputMinHeight = Platform.select({
ios: 30,
android: 37,
});

export class CommentInput extends Component {
props: {
users: Array,
Expand All @@ -60,7 +65,7 @@ export class CommentInput extends Component {

this.state = {
text: '',
height: 0,
height: inputMinHeight,
};
}

Expand Down Expand Up @@ -107,7 +112,7 @@ export class CommentInput extends Component {
this.handleSubmitEditing(event.nativeEvent.text)}
placeholderTextColor={colors.grey}
style={{
height: Math.max(30, this.state.height),
height: Math.max(inputMinHeight, this.state.height),
}}
value={this.state.text}
/>
Expand Down

0 comments on commit e3e5a7f

Please sign in to comment.