Constructor
new TableRow(cells, initialValuesopt, …args)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
cells |
Array.<qui.tables.TableCell> | table cells |
|
initialValues |
Array |
<optional> |
optional initial values |
args |
* |
<repeatable> |
parent class parameters |
- Source:
Extends
Methods
getCellIndex(cell) → {Number}
Return the index of the given cell. If the field does not belong to this row, -1 is returned.
Parameters:
| Name | Type | Description |
|---|---|---|
cell |
qui.tables.TableCell | the cell |
- Source:
Returns:
- Type
- Number
getCells() → {Array.<qui.tables.TableCell>}
Return row cells.
- Source:
Returns:
- Type
- Array.<qui.tables.TableCell>
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
getTable() → {qui.tables.Table}
Return the owning table.
- Source:
Returns:
- Type
- qui.tables.Table
getValues() → {Array}
Return the current values of the cells.
- Source:
Returns:
- Type
- Array
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
|
- 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
prepareCell(cell)
Prepare cell to be part of this row.
Parameters:
| Name | Type | Description |
|---|---|---|
cell |
qui.tables.TableCell |
- Source:
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:
setValues(values, indexopt)
Set row values. If more values than needed are supplied, extra values are ignored. If less values are supplied, extra cells are left unchanged.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
values |
Array | |||
index |
Number |
<optional> |
0 | optional start index (defaults to |
- 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