From 6310d9389ddaf80a1d8e0aecfb6cacbaf3b6b5b0 Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Thu, 4 Apr 2019 17:01:10 -0700
Subject: Adding Iframe expand

- Adding Iframe Expand. Fixes #32
- Fix issue with table sorting. Fixes #33
- Changing all to h4s. Fixes #30
---
 ui/src/components/communities.tsx | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'ui/src/components/communities.tsx')

diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx
index 921ef157..80953aaa 100644
--- a/ui/src/components/communities.tsx
+++ b/ui/src/components/communities.tsx
@@ -6,6 +6,8 @@ import { UserOperation, Community, Post as PostI, GetPostResponse, PostResponse,
 import { WebSocketService, UserService } from '../services';
 import { msgOp, hotRank,mdToHtml } from '../utils';
 
+declare const Sortable: any;
+
 interface CommunitiesState {
   communities: Array<Community>;
 }
@@ -29,12 +31,17 @@ export class Communities extends Component<any, CommunitiesState> {
     WebSocketService.Instance.listCommunities();
   }
 
+  componentDidMount() {
+    let table = document.querySelector('#community_table');
+    Sortable.initTable(table);
+  }
+
   render() {
     return (
       <div class="container-fluid">
         <h4>Communities</h4>
         <div class="table-responsive">
-          <table class="table table-sm table-hover" data-sortable>
+          <table id="community_table" class="table table-sm table-hover" data-sortable>
             <thead>
               <tr>
                 <th>Name</th>
-- 
cgit v1.2.3

