mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 07:36:37 +00:00
Fixing post title height. Fixes #147
This commit is contained in:
parent
9d94cc9094
commit
cab454dd89
|
@ -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}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue