Home Reference Source
import LoadMoreCommentsViewController from '~/controllers/LoadMoreCommentsViewController.js'
public class | source

LoadMoreCommentsViewController

Extends:

ViewController → LoadMoreCommentsViewController

Manages the "Load More" button

Constructor Summary

Public Constructor
public

constructor(button: HTMLElement, owner: Post | Answer, parentList: CommentListViewController, shouldExpand: boolean)

Creates the write commemt button

Member Summary

Public Members
public get

Gets the loading status

public set

Sets the loading status

public
public
public
public

Method Summary

Public Methods
public

Gets the comments for a given page

public

async loadNextPage()

Submits this form

Inherited Summary

From class ViewController
public static

forClass(className: string, predicate: Function, root: HTMLElement)

Creates a view controller directly for all members of a class.

public static

of(elem: string | Element): ViewController

Returns a canolical VC of an element if it exists

Public Constructors

public constructor(button: HTMLElement, owner: Post | Answer, parentList: CommentListViewController, shouldExpand: boolean) source

Creates the write commemt button

Override:

ViewController#constructor

Params:

NameTypeAttributeDescription
button HTMLElement

The loading button

owner Post | Answer

The owner post

parentList CommentListViewController

The list view which to place comment in.

shouldExpand boolean
  • optional
  • default: false

Follows 'expansion' semantics

Public Members

public get isLoading: Boolean source

Gets the loading status

Return:

Boolean

public set isLoading: boolean source

Sets the loading status

public owner: Post | Answer source

public pageIndex: number source

public parentList: CommentListViewController source

public shouldExpand: boolean source

Public Methods

public async contentsForPage(): Object source

Gets the comments for a given page

Return:

Object

Return Properties:

NameTypeAttributeDescription
areMore boolean

If they are more pages

comments Comment[]

Additional comments

public async loadNextPage() source

Submits this form