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:
| Property | Description |
|---|---|
| FlashingCellDefinitions | Flashing Cell Definitions - will flash cells/rows when rule is met |
Flashing Cell Definition
Each Flashing Cell Definition is defined as follows:
| Property | Description | Default |
|---|---|---|
| DownChangeStyle | Style for 'Down' value changes | Red BackColour |
| FlashDuration | Duration of Flash - can be number (in ms) or 'always' | 500ms |
| FlashTarget | Should a cell or whole row flash | 'cell' |
| Name | Name of the Flashing Cell Definition | |
| NeutralChangeStyle | Style for 'Neutral' value changes | Gray BackColour |
| Rule | When Flashing Cell should be triggered | |
| Scope | Which Columns, DataTypes or Column Types can Flash | |
| UpChangeStyle | Style for 'Up' value changes | Green BackColour |
| IsReadOnly | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') | |
| IsSuspended | Suspends (i.e. turns off) an Adaptable Object |
Flashing Cell Options
The Flashing Cell Options section of Adaptable Options contains Flashing Cell properties:
| Property | Description | Default |
|---|---|---|
| defaultDownChangeStyle | Style for 'Down' value changes | Red BackColour |
| defaultFlashDuration | Duration of Flash - can be number (in ms) or 'always' | 500ms |
| defaultFlashTarget | Should a cell or whole row flash | 'cell' |
| defaultNeutralChangeStyle | Style for 'Neutral' value changes | Gray BackColour |
| defaultUpChangeStyle | Style for 'Up' value changes | Green 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.
| Method | Description |
|---|---|
| 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:
| Property | Description |
|---|---|
| flashingCell | Details of the Cell (or row) which has just flashed |
| adaptableContext | Custom application Context provided in AdaptableOptions.adaptableContext |
This flashingCell property is of type AdaptableFlashingCell defined as follows:
| Property | Description |
|---|---|
| cellDataChangedInfo | Data change which triggered the FlashingCell |
| direction | Direction of the change: 'up', 'down' or 'neutral' |
| flashColumnIds | Column Ids that are flashing |
| flashingCellDefinition | Rule that caused the FlashingCell to fire |
| flashTarget | What will flash (e.g. Cell, Row) |
| rowPrimaryKey | Primary 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
});