The object for defining conditions that will cause a conditional style to be applied to a cell.
Technology
- Apple News Format 1.7+
Properties
column Index
integer
Specifies a column index. The leftmost column of data has an index of 0
.
descriptor
string
Specifies the identifier
of a specific data descriptor. All cells for this data descriptor will be selected. See DataDescriptor.
even Columns
boolean
When true
, selects the cells in even columns.
even Rows
boolean
When true
, selects the cells in even rows.
odd Columns
boolean
When true
, selects the cells in odd columns.
odd Rows
boolean
When true
, selects the cells in odd rows.
row Index
integer
Specifies a row index. The topmost row of data has an index of 0
.
Discussion
Use the Table
object to set the criteria that must be met in order for conditional styles to be applied to cells. For example, you could set criteria to select a cell at a specific location or to select cells for a certain data descriptor.
This object can be used in ConditionalTableCellStyle.
TableCellSelector Properties
{
"components": [
{
"role": "datatable",
"style": "bookTableStyle",
"showDescriptorLabels": true,
"sortBy": [
{
"descriptor": "id-publication-date",
"direction": "ascending"
}
],
"data": {
"descriptors": [
{
"identifier": "id-publication-date",
"key": "publicationDate",
"label": "Date",
"dataType": "string"
},
{
"identifier": "id-title",
"key": "title",
"label": "Title",
"dataType": "string"
},
{
"identifier": "id-publisher",
"key": "publisher",
"label": "Publisher",
"dataType": "string"
}
],
"records": [
{
"title": "Mardi",
"publicationDate": "1849",
"publisher": "Harper & Brothers"
},
{
"title": "Typee",
"publicationDate": "1846",
"publisher": "Wiley and Putnam"
},
{
"title": "White-Jacket",
"publicationDate": "1850",
"publisher": "Harper & Brothers"
},
{
"title": "Omoo",
"publicationDate": "1847",
"publisher": "Harper & Brothers"
},
{
"title": "Redburn",
"publicationDate": "1849",
"publisher": "Harper & Brothers"
},
{
"title": "Moby-Dick",
"publicationDate": "1851",
"publisher": "Harper & Brothers"
}
]
}
}
],
"componentStyles": {
"bookTableStyle": {
"tableStyle": {
"headerCells": {
"padding": 5,
"textStyle": {
"fontWeight": "bold",
"fontStyle": "normal"
}
},
"cells": {
"padding": 2,
"conditional": [
{
"selectors": [
{
"oddRows": true
}
],
"backgroundColor": "#eeeeee"
}
]
}
}
}
}
}