From 8a5f907b2f499c8ebcf9ee7c2c2e78ac7d49e636 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 3 Aug 2019 13:26:20 -0700 Subject: [PATCH] Adding a debounce. --- ui/src/components/post-form.tsx | 7 +++--- ui/src/utils.ts | 42 +++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 9b33c6e14..54b3ca440 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -4,7 +4,7 @@ import { Subscription } from "rxjs"; import { retryWhen, delay, take } from 'rxjs/operators'; import { PostForm as PostFormI, Post, PostResponse, UserOperation, Community, ListCommunitiesResponse, ListCommunitiesForm, SortType, SearchForm, SearchType, SearchResponse } from '../interfaces'; import { WebSocketService, UserService } from '../services'; -import { msgOp, getPageTitle } from '../utils'; +import { msgOp, getPageTitle, debounce } from '../utils'; import * as autosize from 'autosize'; interface PostFormProps { @@ -87,7 +87,7 @@ export class PostForm extends Component {
- + {this.state.suggestedTitle &&
copy suggested title: {this.state.suggestedTitle}
} @@ -96,7 +96,7 @@ export class PostForm extends Component {
-