From: Dessalines Date: Sun, 15 Dec 2019 00:15:28 +0000 (-0800) Subject: Fix post title and url change. X-Git-Url: http://these/git/%7Blink%7D?a=commitdiff_plain;h=f2b2f99a51cab4cdf52711e5195892440bd019af;p=lemmy.git Fix post title and url change. - Fixes #368 --- diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index fd51c38f..9bfa7063 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -20,12 +20,12 @@ import { WebSocketService, UserService } from '../services'; import { msgOp, getPageTitle, - debounce, validURL, capitalizeFirstLetter, markdownHelpUrl, archiveUrl, mdToHtml, + debounce, } from '../utils'; import * as autosize from 'autosize'; import { i18n } from '../i18next'; @@ -79,6 +79,7 @@ export class PostForm extends Component { if (this.props.post) { this.state.postForm = { body: this.props.post.body, + // NOTE: debouncing breaks both these for some reason, unless you use defaultValue name: this.props.post.name, community_id: this.props.post.community_id, edit_id: this.props.post.id, @@ -142,7 +143,7 @@ export class PostForm extends Component { {this.state.suggestedTitle && ( @@ -208,7 +209,7 @@ export class PostForm extends Component {