UserListPage
Extends:
Admin page which displays a paginated list of all users on the forum.
Member Summary
Public Members | ||
public |
|
|
public |
moreData: * Are there more users available? |
|
public |
numPerPage: * Number of users to load per page. |
|
public |
pageData: * This page's array of users.
|
|
public |
pageNumber: * Current page number. |
|
public |
userCount: * Total number of forum users. |
Method Summary
Public Methods | ||
public |
columns(): * Build an item list of columns to show for each user. |
|
public |
Component to render. |
|
public |
getTotalPageCount(): * Get total number of user pages. |
|
public |
headerInfo(): {"className": string, "icon": string, "title": *, "description": *} |
|
public |
async loadPage(pageNumber: *) Asynchronously fetch the next set of users to be rendered. |
|
public |
nextPage() |
|
public |
|
Public Members
public isLoadingPage: * source
public pageData: * source
This page's array of users.
undefined
when page loads as no data has been fetched.
public userCount: * source
Total number of forum users.
Fetched from the active AdminApplication
(app
), with
data provided by AdminPayload.php
, or flarum/statistics
if installed.
Public Methods
public columns(): * source
Build an item list of columns to show for each user.
Each column in the list should be an object with keys name
and content
.
name
is a string that will be used as the column name.
content
is a function with the User model passed as the first and only argument.
See UserListPage.tsx
for examples.
Return:
* |
public async loadPage(pageNumber: *) source
Asynchronously fetch the next set of users to be rendered.
Returns an array of Users, plus the raw API payload.
Uses the this.numPerPage
as the response limit, and automatically calculates the offset required from pageNumber
.
Params:
Name | Type | Attribute | Description |
pageNumber | * | The page number to load and display |