Class: IconLabelListItem

qui.lists.commonitems.IconLabelListItem(…args)

A list item made of an icon and a label.

Constructor

new IconLabelListItem(…args)

Parameters:
Name Type Attributes Description
args * <repeatable>

parent class parameters

Mixes In:
Source:

Extends

Methods

getData() → {*}

Return the item user data.

Overrides:
Source:
Returns:
Type
*

getKey() → {*}

Return the value that identifies this item across updates. Two items with the same key, at the same position, are the same row, so the list can update it where it is instead of building it again.

Overrides:
Source:
Returns:

the key, or null if the item cannot be identified and must always be rebuilt

Type
*

getList() → {qui.lists.List}

Return the owning list.

Overrides:
Source:
Returns:
Type
qui.lists.List

getMatchPhrase() → {String}

Return the text a search filter is matched against: the label and the sub-label joined in the order in which they are displayed, so that a filter can span both.

Source:
Returns:
Type
String

hide()

Hide the field.

Overrides:
Source:

isExplicitlyHidden() → {Boolean}

Tell if the item has been hidden with qui.lists.ListItem#hide, as opposed to being filtered out by its list's search filter.

Overrides:
Source:
Returns:
Type
Boolean

isHidden() → {Boolean}

Tell if the item is hidden, either because it has been explicitly hidden or because it is currently filtered out by its list's search filter.

Overrides:
Source:
Returns:
Type
Boolean

isMatch(filter) → {Boolean}

Tell if item matches a search filter. By default, uses qui.utils.string.intelliSearch on textual content of the HTML element.

Parameters:
Name Type Description
filter String | RegExp

search filter, possibly precompiled with qui.utils.string.intelliSearchRegExp

Overrides:
Source:
Returns:
Type
Boolean

isSelected()

Tell if item is selected or not.

Overrides:
Source:

(abstract) makeContent() → {jQuery}

Implement this method to create the actual list item content.

Overrides:
Source:
Returns:
Type
jQuery

setData(data)

Set the item user data.

Parameters:
Name Type Description
data *
Overrides:
Source:

setList(list)

Set the owning list.

Parameters:
Name Type Description
list qui.lists.List
Overrides:
Source:

setSelected(selected)

Select or deselect item.

Parameters:
Name Type Description
selected Boolean
Overrides:
Source:

setSelectMode(selectMode)

Set select mode. This is internally called by owning qui.lists.List.

Parameters:
Name Type Description
selectMode String

one of:

Overrides:
Source:

show()

Show the item.

Overrides:
Source:

updateFrom(other) → {Boolean}

Update this item in place, from a freshly built item representing the same row.

The base implementation refuses, so that a list containing items which do not implement this keeps its old rebuild-everything behaviour rather than silently showing stale content.

Parameters:
Name Type Description
other qui.lists.ListItem

the freshly built item

Overrides:
Source:
Returns:

true if the item took the update, false to have the list rebuild the row instead

Type
Boolean