new (require("nmodule/webEditors/rc/wb/table/model/columns/IconColumn"))()
API Status: Development
Column type used to show an icon in a specific column the table. This
column type will not, by default, be available in the show/hide menu, and
will not have the sorting functionality available. Users of this type can
change this behavior by calling the #setSortable and #setHidable
functions after construction.
Extends:
Methods
-
buildCell(row, dom)
-
Build the dom for the cell. This will build an
IconEditorfor each
icon returned by thegetValueForfunction.Parameters:
Name Type Description rowmodule:nmodule/webEditors/rc/wb/table/model/Row domJQuery Returns:
A promise resolved with the img element added to the dom.
- Type
- Promise
-
destroyCell(row, dom)
-
Destroy the IconEditor that was created for this cell.
Parameters:
Name Type Description rowmodule:nmodule/webEditors/rc/wb/table/model/Row domJQuery Returns:
- Type
- Promise
-
getColumnIcon()
-
Returns a URI for an icon representing this column. Returns
nullby
default; override as needed in subclasses.- Inherited From:
Returns:
a URI for an icon to be shown for this column.
- Type
- String
-
getFlags()
-
Get the flags set on this column.
- Inherited From:
Returns:
- Type
- Number
-
getName()
-
Get the column name or
nullif none was given.- Inherited From:
Returns:
- Type
- String
-
getValueFor(row)
-
Gets the icon URI for the given row. By default, this will delegate to
theRow's getIcon() function. This function can be overridden to allow
the source of the icon to be more flexible. This method may return a single
icon, or an array of icons.Parameters:
Name Type Description rowmodule:nmodule/webEditors/rc/wb/table/model/Row A table row
Returns:
the icon(s) for the row, or null if the row does not
specify any.- Type
- baja.Icon | Array.<baja.Icon>
-
hasFlags(flags)
-
Return true if the column has all of the given flags.
Parameters:
Name Type Description flagsNumber flags to check for
- Inherited From:
Returns:
- Type
- Boolean
-
isEditable()
-
Return true if the column is editable.
- Inherited From:
Returns:
- Type
- Boolean
-
isExportable()
-
Return true if the column should show up in export operations, e.g. to CSV.
- Since:
-
- Niagara 4.8
- Inherited From:
Returns:
- Type
- Boolean
-
isHidable()
-
Return true if the column should available in the table's show/hide context menu.
Defaults to true.- Inherited From:
Returns:
- Type
- Boolean
-
isReadonly()
-
Return true if the column is readonly.
- Inherited From:
Returns:
- Type
- Boolean
-
isSortable()
-
Returns a boolean indicating whether the column should not be sortable via the table headings.
Defaults to true.- Inherited From:
Returns:
- Type
- Boolean
-
isUnseen()
-
Return true if the column is unseen.
- Inherited From:
Returns:
- Type
- Boolean
-
setEditable(editable)
-
Set or unset the column's
EDITABLEflag. Emits aflagsChangedevent.Parameters:
Name Type Description editableboolean - Inherited From:
-
setExportable(exportable)
-
Set or unset whether the column should show up in export operations.
Parameters:
Name Type Description exportableboolean - Since:
-
- Niagara 4.8
- Inherited From:
-
setFlags(flags)
-
Set the column's flags.
Parameters:
Name Type Description flagsNumber - Inherited From:
Throws:
-
if a non-Number given
- Type
- Error
-
setHidable(hidable)
-
Set or unset whether the column should be allowed to be hidden or shown by the table's
show/hide context menu.Parameters:
Name Type Description hidableboolean - Inherited From:
-
setReadonly(readonly)
-
Set or unset the column's
READONLYflag. Emits aflagsChangedevent.Parameters:
Name Type Description readonlyboolean - Inherited From:
-
setSortable(sortable)
-
Set or unset whether the column should be allowed to be sorted by the table heading.
Parameters:
Name Type Description sortableboolean - Inherited From:
-
setUnseen(unseen)
-
Set or unset the column's
UNSEENflag. Emits aflagsChangedevent.Parameters:
Name Type Description unseenboolean - Inherited From:
-
toDisplayName()
-
Resolves a display name for this column.
- Inherited From:
Returns:
promise to be resolved when the element's display name
has been fully built. It's also acceptable for overrides of this function
to complete synchronously without returning a promise, so be sure to wrap
calls to this function inPromise.resolve()when appropriate.- Type
- Promise | *