Flashing Cell Technical Reference
Flashing Cell State
FlashingCellState
Flashing Cell section of Adaptable State, including Initial State.
Each definition watches columns in Scope and flashes when Rule is true. FlashTarget is 'cell' (the default), 'row', 'aggFuncCell', or a list of those. UpChangeStyle, DownChangeStyle and NeutralChangeStyle colour the flash. FlashDuration is milliseconds or 'always' (the default is 500).
Flashing Cell definitions. Each one names a column scope, a boolean rule, and what flashes.
Flashing Cell Definition
FlashingCellDefinition
Flashes a cell, a row, or an aggregated cell when a rule matches.
Scope and Rule are required. Type is 'Change' (this edit against the previous value) or 'Observable' (change history such as CHANGE_COUNT). When Type is omitted it is treated as 'Change'. Suspend with IsSuspended.
string
Name of the Flashing Cell Definition
string
AdapTableQL boolean expression deciding when the Flashing Cell is triggered
(evaluated per data change for Change; against live history for Observable),
e.g. ANY_CHANGE([price]) or CHANGE_COUNT{[price], WITHIN(5m)} > 3
Which Columns, DataTypes or Column Types can Flash
'Change' compares this edit with the previous value. 'Observable' evaluates the rule against change history. When omitted, the definition is treated as 'Change'.
boolean
Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
boolean
Suspends (i.e. turns off) an Adaptable Object
Scope
ColumnScope
Which columns an object applies to. Set exactly one shape.
true
Matches every column. All must be true.
('text' | 'number' | 'boolean' | 'date' | 'textArray' | 'numberArray')[]
Data types to match, for example ['number'] or ['text', 'textArray']. Object, tuple and unknown columns are not scope data types. Name those columns with ColumnIds.
string[]
Column ids to match. These are AG Grid colId values.
string[]
AG Grid column type names, the strings set on colDef.type.
Type is a FlashingCellType:
| Value |
|---|
'Change' |
'Observable' |
FlashTarget is a FlashTargetTypes:
| Value |
|---|
'row' |
'cell' |
'aggFuncCell' |
UpChangeStyle, DownChangeStyle and NeutralChangeStyle are an AdaptableStyle:
AdaptableStyle
Colours, font and border for a cell, header or highlight.
Text properties (ForeColor, FontWeight, FontStyle, TextDecoration, FontSize, Alignment) and box properties (BackColor, BorderColor, BorderRadius) are applied together. ClassName adds a CSS class and does not turn the other properties off. A Styled Column can take just the text slice (Font) or just the box slice (Cell).
CellFontStyle
The "text" half of an AdaptableStyle: everything that affects the
rendering of text (and, by convention, the alignment of the cell's primary
content block — for plain text that is text-align, for Badge it is the
alignment of the badge row).
Used as a Font? slot on Styled Columns whose renderer paints a non-text
primary content (Gradient tint, Percent Bar, Bullet Chart) so the column
can still control the cell's text styling without inheriting any other
properties from a Format Column.
Alignment
Align to Left, Right or Center
'XSmall' | 'Small' | 'Medium' | 'Large' | 'XLarge'
Size of font: XSmall, Small, Medium, Large or XLarge
'Normal' | 'Italic'
Style of font: Normal or Italic
'Normal' | 'Bold'
Weight of font: Normal or Bold
string
Font colour in cell: hex, rgb(a) or name
'None' | 'Underline' | 'Overline' | 'LineThrough'
Decoration of font: None, Underline, Overline or LineThrough
CellBoxStyle
The "box" half of an AdaptableStyle: everything that paints the cell box
(background colour and the border that wraps the cell).
Used as a Cell? slot on Styled Columns whose renderer paints into the
cell content but leaves the cell chrome alone (Rating, Sparkline) so the
column can opt-in to a tinted/bordered cell without inheriting other
properties from a Format Column.
string
Colour background of cell: hex, rgb(a) or name
string
Colour of cell border: hex, rgb(a) or name
number
Rounds corners of an element's outer border edge; equivalent of CSS border-radius
string
CSS class added to the cell. Colour, font and border properties on this object are still applied.
Flashing Cell Options
FlashingCellOptions
Properties for Flashing Cell
Style for 'Down' value changes
BackColor of var(--ab-color-flash-down) (red in the shipped themes)
number | 'always'
Duration of Flash - can be number (in ms) or 'always'
500ms
Style for 'Neutral' value changes
BackColor of var(--ab-color-flash-neutral) (gray in the shipped themes)
Style for 'Up' value changes
BackColor of var(--ab-color-flash-up) (green in the shipped themes)
defaultFlashTarget is a FlashTarget:
| Value |
|---|
'row' |
'cell' |
Flashing Cell API
FlashingCellApi
Flashing Cell definitions, and flashing a cell when its value changes.
Adds a Flashing Cell Definition to State
Adds provided Flashing Cell Definitions
void
Clears all Cells and Rows which have been flashed (primarily used if duration is 'Always')
Deletes a Flashing Cell
Edits Flashing Cell Definition in State with given one
Edits provided Flashing Cell Definitions
Find all Flashing Cell Definitions which match the given criteria
Retrieves all active (non-suspended) cell Definitions in Flashing Cell State
Retrieves Flashing Cell Definition by the technical ID (from FlashingCellState)
FlashingCellDefinition | undefined
Retrieves a Flashing Cell Definition by its Name
Retrieves all Flashing Cell Definitions in Flashing Cell State
FlashingCellDefinition['FlashTarget']
Returns FlashTarget of the given Flashing Cell Definition
Retrieves Flashing Cell section from Adaptable State
Retrieves all suspended Cell Definitions in Flashing Cell State
boolean
Is there any cells/rows currently being flashed
Sets a collection of Flashing Cell Definitions into State
void
Evaluates the given Flashing Cell Definition and flashes the correspondent cells/rows
void
Suspends all FlashingCell Definitions
Suspends a Flashing Cell Definition
void
Activates all suspended Flashing Cell Definition
Activates a suspended Flashing Cell Definition
Flashing Cell Displayed Event
The FlashingCellDisplayedEvent fires when a Cell or Row has flashed.
EventInfo
The Flashing Cell Displayed Event has a FlashingCellDisplayedInfo object which contains one property:
FlashingCellDisplayedInfo
Payload of the FlashingCellDisplayed event.
Fires when a cell or row flashes.
Extends , so adaptableApi is included.
What flashed: the cell or row, and the change that caused the flash.
Custom application Context provided in AdaptableOptions.adaptableContext
This flashingCell property is of type AdaptableFlashingCell defined as follows:
AdaptableFlashingCell
A cell or row that has just flashed.
flashingCellDefinition is the rule. cellDataChangedInfo is the change that triggered it, when there is one. direction is up, down or neutral. flashTarget is what flashed (cell or row).
Data change which triggered the FlashingCell
'up' | 'down' | 'neutral'
Direction of the change: 'up', 'down' or 'neutral'
Record<string, boolean>
Column Ids that are flashing
Rule that caused the FlashingCell to fire
FlashingCellDefinition['FlashTarget']
What will flash (e.g. Cell, Row)
string
Primary Key Value of Row which is flashing
cellDataChangedInfo is a CellDataChangedInfo:
CellDataChangedInfo
Defines a Cell Edit - includes full details of old and new values, the column and the enclosing Row
number
Timestamp of change occurrence (in milliseconds)
AdaptableColumn<TData>
Column in which cell is situated
any
Value after the change.
Absent when trigger is live.
any
Value before the change.
Absent when trigger is live.
boolean
Whether the change was prevented by a validation rule
Primary Key Column's value for the row where edited cell is situated
TData
Data in the Row
IRowNode<TData>
AG Grid RowNode that contains the cell
'edit' | 'tick' | 'undo' | 'aggChange' | 'calculatedColumnChange' | 'live'
What triggered the change - user, background change, a reverted change, a
derived update on a Calculated Column whose source value changed, or a
live Alert rule turning true for the row (live: no old / new value,column is the rule's first Scope column when it has one).
Event Subscription
Subscribing to the Events is done the same as with all Adaptable Events:
api.eventApi.on('FlashingCellDisplayed', (eventInfo: FlashingCellDisplayedInfo) => {
// do something with the info
});