From 10223d5aef157ae2e59edc85b568edd9ec3af8dc Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 15 Feb 2020 16:09:53 -0500 Subject: [PATCH] Fix minor issue with selector. Fix issue with truncate wrapping. --- ui/src/components/post-form.tsx | 10 ++++++---- ui/src/components/post-listing.tsx | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 8abdf26d1..d502330b4 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -518,10 +518,12 @@ export class PostForm extends Component { // Set up select searching let selectId: any = document.getElementById('post-community'); - let selector = new Selectr(selectId, {}); - selector.on('selectr.select', option => { - this.state.postForm.community_id = Number(option.value); - }); + if (selectId) { + let selector = new Selectr(selectId, { nativeDropdown: false }); + selector.on('selectr.select', option => { + this.state.postForm.community_id = Number(option.value); + }); + } } else if (res.op == UserOperation.CreatePost) { let data = res.data as PostResponse; if (data.post.creator_id == UserService.Instance.user.id) { diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 1b8042f8a..41cd6675a 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -169,7 +169,7 @@ export class PostListing extends Component { )}
-
+
{
{post.url && ( - +