Notifications Overview

AdapTable provides a number of ways for users to be notified of important events

Modules

There are 3 different notification-related Modules available:

ModuleDescription
AlertHighlights all cells in the grid that contain matching query text
Flashing AlertRuns real-time text-based queries using the rich and powerful AdapTableQL
System StatusUpdates the entire data set in AdapTable using pre-populated data sources

Notification Options

Options for managing Notifications in AdapTable.

Most of the properties are related to managing Toast Notifications, but there are also properties to help manage Alerts, Flashing Alerts, Alert Forms, Alert Action Buttons and System Status Messages.

PropertyDescriptionDefault
actionHandlersonClick Handlers for Alert Buttons (defined in Alert State)
alertFormsFull definitions of Alert Forms - the names of which are provided in Alert State
alertMessageText
cellHighlightDurationHow long (in ms) a cell will be highlighted3000
closeWhenClickedCloses Notification automatically when its clickedfalse
dataChangeDetectionPolicyWhether Alert rule is evaluated against the rawValue or formattedValue of the changed cell data'rawValue'
durationHow long (in ms) Notifications display for3000
flashingAlertDefaultPropertiesFlashing Alert DefaultsBackColors: Green (up), Red (down), Gray (neutral), Duration: 500ms
isDraggableCan Notification be draggedfalse
maxAlertsInStoreHow many alerts held in State at any one time; when limit is breached, oldest alert will be removed20
maxNotificationsHow many Notifications can be displayed at one time3
maxSystemMessagesInStoreHow many System Status Messages to hold in State; when limit is reached, oldest Message is removed100
pauseWhenHoveringPauses the Notification when mouse hovers over itfalse
positionWhere Notification will appear (if anywhere)'BottomRight'
showProgressBarShows a Progress Bar in the Notificationfalse
showSystemStatusMessageAsAlertDisplay an Alert when a System Status Message is setfalse
transitionHow Notification will appear: 'Bounce', 'Slide', 'Zoom' or 'Flip''Slide'

Toast Notifications

Most of the Notifications Options properties relate to the appearance of the Notification that can be displayed in AdapTable at various times (e.g. when an Alert is triggered, or a Message needs to be displayed).

By default the Notification will appear by sliding into the BottomRight of the screen for 3 seconds without a progress bar and cannot be dragged nor will close when it is clicked.

However all these settings are fully configurable.

caution

Unlike Alert Properties which can be set independently for each Alert Definition, Notifications are set in Alert Options and so are configured identically for every Alert which displays a notification

Notification Events

There are 3 notification based Adaptable Events.

Alert Fired

This fires whenever an Alert is triggered in AdapTable.

The AlertFiredInfo describes the Alert that has been fired - this will contain details of the Alert Definition that triggered the Alert, and (optionally) what Data Change was responsible.

PropertyDescription
alertAlert which has been fired

Flashing Alert Fired

This fires whenever a Flashing Alert is triggered in AdapTable.

The FlashingAlertFiredInfo describes the Flashing Alert which was fired.

PropertyDescription
flashingAlertFlashingAlert which has been fired

The flashingAlert property is of object type AdaptableFlashingAlert defined as follows:

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

System Status Message Displayed

This fires whenever a System Status Message is displayed.

The event provides a SystemStatusMessageDisplayedInfo object defined as follows.

PropertyDescription
systemStatusMessageInfoDetails of the System Status Message and Type

This contains a SystemStatusMessageInfo object with these properties:

PropertyDescription
statusFurtherInformationAdditional information to display (optional)
statusMessageThe Message to be displayed
statusTypeType of Message i.e. Succcess, Warning, Error, Info
timestampWhen Message was sent

Events Subscription

Subscribing to the Events is done the same as with all Adaptable Events:

api.eventApi.on('AlertFired', (eventInfo: AlertFiredInfo) => {
// do something with the info
});
api.eventApi.on('FlashingAlertFired', (eventInfo: FlashingAlertFiredInfo) => {
// do something with the info
});
api.eventApi.on('SystemStatusMessageDisplayed',
(eventInfo: SystemStatusMessageDisplayedInfo) => {
// do something with the info
});

More Information