Configuring Alerts

View as Markdown

Summary

  • Alerts can be provided at design-time through Alert Initial State
  • The Alert Options section of Adaptable Options contains many properties for configuring Alert behaviour

Developers are able to provide Alert Definitions and configure Alerts behaviour at design-time.

Alert Definitions

Alert Definitions can be provided in Alert Initial State or created at run-time

This will ensure that the Alerts will fire as necessary each time the Application loads, and that any changes will be stored with Adaptable State.

Alert Options

There are many options in Alert Options that can be set to manage the behaviour of Alerts.

Highlight Duration

Developers can set the highlight durations for Rows, Cells and the Alert Status Bar Panel.

cellHighlightDuration

Default: 2000
Number
How long (in ms) a Cell will be highlighted when an Alert fires

rowHighlightDuration

Default: 4000
Number
How long (in ms) a Row will be highlighted when an Alert fires

statusbarHighlightDuration

Default: 2000
Number
How long (in ms) Alert panel in Status Bar is highlighted when an Alert Fires

Highlight Style

Note

This defaults to the Alert's MessageType colour but you can provide an Adaptable Style instead

Cell Change Behaviour

Developers can configure the cell change behaviour for triggering Alerts

dataChangeDetectionPolicy

Default: rawValue
'rawValue' | 'formattedValue'
Whether an Alert rule is evaluated against the rawValue or formattedValue of the changed cell data

Number of Alerts Saved

maxAlertsInStore

Default: 20
Number
How many triggered Alerts are held in State at any one time

Consolidating Batch Alerts

Sometimes a single action (e.g. Bulk Update, Smart Edit, or gridApi.setCellValues), can updates several cells simultaneously.

By default each cell update will raise a separate Alert.

AdapTable provides an option to consolidate Alerts from the same Definition into one Alert notification — with a count of how many cells triggered it.

consolidateBatchAlerts

Default: true
boolean
Consolidate Alerts from the same Definition when a batch action updates multiple cells
Alerts: Consolidating Batch Updates
Fork
  • consolidateBatchAlerts is true (the default)
  • An Alert fires on any change to Github Stars and displays a Notification
  • The Update 5 Cells button changes the first 5 Github Stars values in one batch
Try It Out
  • Click Update 5 Cells - Five cells highlight, but the Alert Toolbar / toast shows a single Alert ("5 cells triggered this Alert")
Loading demo…