summaryrefslogtreecommitdiffstats
path: root/ui/src/components/communities.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-04-04 17:01:10 -0700
committerDessalines <tyhou13@gmx.com>2019-04-04 17:01:10 -0700
commit6310d9389ddaf80a1d8e0aecfb6cacbaf3b6b5b0 (patch)
tree9ac003ffbda8e4964ab9e4d42005995856a0ba1f /ui/src/components/communities.tsx
parented688f9292f079e04fa5ad22b2505d8a45cb3d46 (diff)
Adding Iframe expand
- Adding Iframe Expand. Fixes #32 - Fix issue with table sorting. Fixes #33 - Changing all to h4s. Fixes #30
Diffstat (limited to 'ui/src/components/communities.tsx')
-rw-r--r--ui/src/components/communities.tsx9
1 files changed, 8 insertions, 1 deletions
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>