]> Untitled Git - lemmy.git/commitdiff
Fix minor issue with selector. Fix issue with truncate wrapping.
authorDessalines <tyhou13@gmx.com>
Sat, 15 Feb 2020 21:09:53 +0000 (16:09 -0500)
committerDessalines <tyhou13@gmx.com>
Sat, 15 Feb 2020 21:09:53 +0000 (16:09 -0500)
ui/src/components/post-form.tsx
ui/src/components/post-listing.tsx

index 8abdf26d1661458fe943300c8e5e0fda00b0f9ea..d502330b4b2540f2c6bdd661a86c0152c5b847d4 100644 (file)
@@ -518,10 +518,12 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
 
       // 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) {
index 1b8042f8a36830ef2638e0ebf3fd6b555d1fa938..41cd6675a4c59dc5ba4390ce851db2bd78412603 100644 (file)
@@ -169,7 +169,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
           </video>
         )}
         <div className="ml-4">
-          <div className="post-title text-wrap-truncate">
+          <div className="post-title">
             <h5 className="mb-0 d-inline">
               <Link
                 className="text-body"
@@ -180,7 +180,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
               </Link>
             </h5>
             {post.url && (
-              <small>
+              <small class="d-inline-block">
                 <a
                   className="ml-2 text-muted font-italic"
                   href={post.url}