Flashing Cell Technical Reference

Summary

  • Flashing Cells can be defined in Initial Adaptable State and also configured in Adaptable Options
  • Run-time access is provided through Flashing Cell API
  • The Flashing Cell Displayed Event fires when a cell or row flashes

Flashing Cell State

The Flashing Cell section of Initial State contains a collection of FlashingCellDefinition objects:

PropertyDescription
FlashingCellDefinitionsFlashing Cell Definitions - will flash cells/rows when rule is met

Flashing Cell Definition

Each Flashing Cell Definition is defined as follows:

PropertyDescriptionDefault
DownChangeStyleStyle for 'Down' value changesRed BackColour
FlashDurationDuration of Flash - can be number (in ms) or 'always'500ms
FlashTargetShould a cell or whole row flash'cell'
NameName of the Flashing Cell Definition
NeutralChangeStyleStyle for 'Neutral' value changesGray BackColour
RuleWhen Flashing Cell should be triggered
ScopeWhich Columns, DataTypes or Column Types can Flash
UpChangeStyleStyle for 'Up' value changesGreen BackColour
IsReadOnlySets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedSuspends (i.e. turns off) an Adaptable Object

Flashing Cell Options

The Flashing Cell Options section of Adaptable Options contains Flashing Cell properties:

PropertyDescriptionDefault
defaultDownChangeStyleStyle for 'Down' value changesRed BackColour
defaultFlashDurationDuration of Flash - can be number (in ms) or 'always'500ms
defaultFlashTargetShould a cell or whole row flash'cell'
defaultNeutralChangeStyleStyle for 'Neutral' value changesGray BackColour
defaultUpChangeStyleStyle for 'Up' value changesGreen BackColour

Flashing Cell API

The Flashing Cell API section of Adaptable API contains numerous functions.

They include functions to turn Cell Flashing off and on programmatically, and for Rules to be accessed, created, edited, deleted, suspended and shared.

MethodDescription
addFlashingCellDefinition(flashingCellDefinition)Adds a Flashing Cell Definition to State
addFlashingCellDefinitions(flashingCellDefinitions)Adds provided Flashing Cell Definitions
clearAllFlashingCells()Clears all Cells and Rows which have been flashed (primarily used if duration is 'Always')
deleteFlashingCellDefinition(flashingCellDefinition)Deletes a Flashing Cell
editFlashingCellDefinition(flashingCellDefinition)Edits Flashing Cell Definition in State with given one
editFlashingCellDefinitions(flashingCellDefinitions)Edits provided Flashing Cell Definitions
findFlashingCellDefinitions(flashingCellLookupCriteria)Find all Flashing Cell Definitions which match the given criteria
getActiveFlashingCellDefinitions(config)Retrieves all active (non-suspended) cell Definitions in Flashing Cell State
getFlashingCellDefinitionById(id, config)Retrieves Flashing Cell Definition by the technical ID (from FlashingCellState)
getFlashingCellDefinitionByName(name)Retrieves a Flashing Cell Definition by its Name
getFlashingCellDefinitions(config)Retrieves all Flashing Cell Definitions in Flashing Cell State
getFlashingCellFlashTarget(flashingCellDefinition)Returns FlashTarget of the given Flashing Cell Definition
getFlashingCellPredicateDefsForScope(scope)Retrieves all Predicate Defs that match given Scope
getFlashingCellState()Retrieves Flashing Cell section from Adaptable State
getSuspendedFlashingCellDefinitions(config)Retrieves all suspended Cell Definitions in Flashing Cell State
isAnyFlashingCellActive()Is there any cells/rows currently being flashed
setFlashingCellDefinitions(flashingCellDefinitions)Sets a collection of Flashing Cell Definitions into State
showFlashingCell(flashingCellToShow)Evaluates the given Flashing Cell Definition and flashes the correspondent cells/rows
suspendAllFlashingCellDefinition()Suspends all FlashingCell Definitions
suspendFlashingCellDefinition(flashingCellDefinition)Suspends a Flashing Cell Definition
unSuspendAllFlashingCellDefinition()Activates all suspended Flashing Cell Definition
unSuspendFlashingCellDefinition(flashingCellDefinition)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:

PropertyDescription
flashingCellDetails of the Cell (or row) which has just flashed
adaptableContextCustom application Context provided in AdaptableOptions.adaptableContext

This flashingCell property is of type AdaptableFlashingCell defined as follows:

PropertyDescription
cellDataChangedInfoData change which triggered the FlashingCell
directionDirection of the change: 'up', 'down' or 'neutral'
flashColumnIdsColumn Ids that are flashing
flashingCellDefinitionRule that caused the FlashingCell to fire
flashTargetWhat will flash (e.g. Cell, Row)
rowPrimaryKeyPrimary Key Value of Row which is flashing

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
});