mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 14:45:20 +00:00
Fixing post title height. Fixes #147
This commit is contained in:
parent
9d94cc9094
commit
cab454dd89
|
@ -37,6 +37,7 @@ import {
|
||||||
wsClient,
|
wsClient,
|
||||||
authField,
|
authField,
|
||||||
} from '../utils';
|
} from '../utils';
|
||||||
|
import autosize from 'autosize';
|
||||||
|
|
||||||
var Choices;
|
var Choices;
|
||||||
if (isBrowser()) {
|
if (isBrowser()) {
|
||||||
|
@ -125,6 +126,10 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
setupTippy();
|
setupTippy();
|
||||||
this.setupCommunities();
|
this.setupCommunities();
|
||||||
|
let textarea: any = document.getElementById('post-title');
|
||||||
|
if (textarea) {
|
||||||
|
autosize(textarea);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
|
@ -252,7 +257,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
!validTitle(this.state.postForm.name) && 'is-invalid'
|
!validTitle(this.state.postForm.name) && 'is-invalid'
|
||||||
}`}
|
}`}
|
||||||
required
|
required
|
||||||
rows={2}
|
rows={1}
|
||||||
minLength={3}
|
minLength={3}
|
||||||
maxLength={MAX_POST_TITLE_LENGTH}
|
maxLength={MAX_POST_TITLE_LENGTH}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue