new mw.widgets.RowWidget(configopt)
#
A RowWidget is used in conjunction with table widgets
and should not be instantiated by themselves. They group together
text input widgets
to form a unified row of
editable data.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
<optional> |
Configuration options Properties
|
- Mixes In:
- Source:
A RowWidget is used in conjunction with table widgets
and should not be instantiated by themselves.
Extends
Methods
clear()
#
Clear the field values.
getIndex() → {number}
#
Get the row index.
Returns:
The row index
- Type
- number
getLabel() → {string}
#
Get the label displayed on the row. If no custom label is set, the row index is used instead.
Returns:
The row label
- Type
- string
insertCell(data, index, key)
#
Insert a cell at a specified index.
Parameters:
Name | Type | Description |
---|---|---|
data |
string | The cell data |
index |
number | The index to insert the cell at |
key |
string | A key for easy cell selection |
onClear()
#
Handle clear requests.
onInsertCell(data, index)
#
Handle model cell insertions.
Parameters:
Name | Type | Description |
---|---|---|
data |
string | The initial data |
index |
number | The index in which to insert the new cell |
onLabelUpdate()
#
Update model label changes.
onRemoveCell(index)
#
Handle model cell removals.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The removed cell index |
onValueChange(index, value)
#
Handle model value changes.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The column index of the updated cell |
value |
number | The new value |
Fires:
removeCell(index)
#
Removes a column at a specified index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index to removeColumn |
setDisabled()
#
setIndex(index)
#
Set the row index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The new index |
setLabel(label)
#
Set the label to be displayed on the widget.
Parameters:
Name | Type | Description |
---|---|---|
label |
string | The new label |
Fires:
setValue(index, value)
#
Set the value of a particular cell.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The cell index |
value |
string | The new value |
Events
deleteButtonClick()
#
Fired when the delete button for the row is pressed.
inputChange(index, value)
#
Change when an input contained within the row is updated.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index of the cell that changed |
value |
string | The new value of the cell |
labelUpdate(label)
#
Parameters:
Name | Type | Description |
---|---|---|
label |
string |