From 19636a16ad326396964e90c3119e4f4e14e3f075 Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 28 Mar 2019 13:29:30 +0100 Subject: [PATCH] added typedoc for toplevel communities component --- .../top-level-community-list.component.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/app/+home-page/top-level-community-list/top-level-community-list.component.ts b/src/app/+home-page/top-level-community-list/top-level-community-list.component.ts index d946405fc1..1115d785a3 100644 --- a/src/app/+home-page/top-level-community-list/top-level-community-list.component.ts +++ b/src/app/+home-page/top-level-community-list/top-level-community-list.component.ts @@ -11,6 +11,9 @@ import { fadeInOut } from '../../shared/animations/fade'; import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; import { take } from 'rxjs/operators'; +/** + * this component renders the Top-Level Community list + */ @Component({ selector: 'ds-top-level-community-list', styleUrls: ['./top-level-community-list.component.scss'], @@ -20,8 +23,19 @@ import { take } from 'rxjs/operators'; }) export class TopLevelCommunityListComponent implements OnInit { + /** + * A list of remote data objects of all top communities + */ communitiesRD$: BehaviorSubject>> = new BehaviorSubject>>({} as any); + + /** + * The pagination configuration + */ config: PaginationComponentOptions; + + /** + * The sorting configuration + */ sortConfig: SortOptions; constructor(private cds: CommunityDataService) { @@ -36,6 +50,10 @@ export class TopLevelCommunityListComponent implements OnInit { this.updatePage(); } + /** + * Called when one of the pagination settings is changed + * @param event The new pagination data + */ onPaginationChange(event) { this.config.currentPage = event.page; this.config.pageSize = event.pageSize; @@ -44,6 +62,9 @@ export class TopLevelCommunityListComponent implements OnInit { this.updatePage(); } + /** + * Update the list of top communities + */ updatePage() { this.cds.findTop({ currentPage: this.config.currentPage,