Class: PageList

qui.lists.commonlists.PageList(…args)

A list that can be used as a page.

Constructor

new PageList(…args)

Parameters:
Name Type Attributes Description
args * <repeatable>

parent class parameters

Mixes In:
Source:

Extends

Methods

addItem(index, item)

Add one item to the list.

Parameters:
Name Type Description
index Number

the index where the item should be added; -1 will add the item at the end

item qui.lists.ListItem

the item

Overrides:
Source:

disableAdd()

Disable the add feature.

Overrides:
Source:

disableSearch()

Disable the search feature.

Overrides:
Source:

enableAdd()

Enable the search feature.

Overrides:
Source:

enableSearch()

Enable the search feature.

Overrides:
Source:

getItems() → {Array.<qui.lists.ListItem>}

Return all items.

Overrides:
Source:
Returns:
Type
Array.<qui.lists.ListItem>

getSelectedItems() → {Array.<qui.lists.ListItem>}

Return the currently selected items.

Overrides:
Source:
Returns:
Type
Array.<qui.lists.ListItem>

isAddEnabled() → {Boolean}

Tell if the add feature is enabled

Overrides:
Source:
Returns:
Type
Boolean

isSearchEnabled() → {Boolean}

Tell if the search feature is enabled

Overrides:
Source:
Returns:
Type
Boolean

onAdd() → (nullable) {Promise}

Override this to define the behavior of the list when the add button is pressed.

Overrides:
Source:
Returns:

an optional promise which, if rejected with no argument, will cancel adding

Type
Promise

onSelectionChange(oldItems, newItems) → (nullable) {Promise}

Called when the current selection is changed by user.

Parameters:
Name Type Description
oldItems Array.<qui.lists.ListItem>

the previously selected items (can be empty)

newItems Array.<qui.lists.ListItem>

the new selected items (can be empty)

Overrides:
Source:
Returns:

an optional promise which, if rejected with no argument, will cancel the selection change

Type
Promise

prepareItem(item)

Prepare item to be part of this list.

Parameters:
Name Type Description
item qui.lists.ListItem
Overrides:
Source:

removeItem(item) → {Boolean}

Remove a specific item.

Parameters:
Name Type Description
item qui.lists.ListItem

the item to remove

Overrides:
Source:
Returns:

true if item found and removed, false otherwise

Type
Boolean

removeItemAt(index) → (nullable) {qui.lists.ListItem}

Remove the item at a given index.

Parameters:
Name Type Description
index Number

the index of the item to remove

Overrides:
Source:
Returns:

the removed item

Type
qui.lists.ListItem

removeItems(matchFunc) → {Array.<qui.lists.ListItem>}

Remove all items that match a condition.

Parameters:
Name Type Description
matchFunc qui.lists.ListItemMatchFunc
Overrides:
Source:
Returns:

the removed items

Type
Array.<qui.lists.ListItem>

setItem(index, item)

Update one item.

Parameters:
Name Type Description
index Number

the index where to perform the update

item qui.lists.ListItem

the item to update

Overrides:
Source:

setItems(items)

Set the items of the list.

Parameters:
Name Type Description
items Array.<qui.lists.ListItem>

list items

Overrides:
Source:

setSelectedItems(items)

Update current selection.

Parameters:
Name Type Description
items Array.<qui.lists.ListItem>

the list of new items to select; empty list clears selection

Overrides:
Source:

setSelectMode(selectMode)

Set selection mode.

Parameters:
Name Type Description
selectMode String

one of:

Overrides:
Source: