UserListPage
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 |
|
Inherited Summary
From class Page | ||
public |
A class name to apply to the body while the route is active. |
|
public |
Whether we should scroll to the top of the page when its rendered. |
|
public |
Whether the browser should restore scroll state on refreshes. |
|
public |
oncreate(vnode: *) |
|
public |
oninit(vnode: *) |
|
public |
onremove(vnode: *) |
From class AdminPage | ||
public |
|
|
public |
settings: {} |
|
public |
buildSettingComponent(setting: *): JSX.Element buildSettingComponent takes a settings object and turns it into a component. |
|
public |
|
|
public |
dirty(): * |
|
public |
header(): * |
|
public |
headerInfo(): {"className": *, "icon": *, "title": *, "description": *} |
|
public |
isChanged(): * |
|
public |
oninit(vnode: *) |
|
public |
onsaved() |
|
public |
saveSettings(e: *): * |
|
public |
|
|
public |
submitButton(): * |
|
public |
view(): * |
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 headerInfo(): {"className": string, "icon": string, "title": *, "description": *} source
Override:
AdminPage#headerInfopublic 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 |