From 3de0a32d95eb3668f3b0ad6b90332438cc2aae13 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 14 Dec 2019 16:15:28 -0800 Subject: [PATCH] Fix post title and url change. - Fixes #368 --- ui/src/components/post-form.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index fd51c38f6..9bfa70633 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 {