Fixing post title height. Fixes #147

This commit is contained in:
Dessalines 2021-01-27 10:29:01 -05:00
parent 9d94cc9094
commit cab454dd89
1 changed files with 6 additions and 1 deletions

View File

@ -37,6 +37,7 @@ import {
wsClient,
authField,
} from '../utils';
import autosize from 'autosize';
var Choices;
if (isBrowser()) {
@ -125,6 +126,10 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
componentDidMount() {
setupTippy();
this.setupCommunities();
let textarea: any = document.getElementById('post-title');
if (textarea) {
autosize(textarea);
}
}
componentDidUpdate() {
@ -252,7 +257,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
!validTitle(this.state.postForm.name) && 'is-invalid'
}`}
required
rows={2}
rows={1}
minLength={3}
maxLength={MAX_POST_TITLE_LENGTH}
/>