Providing Adaptable Context
Summary
- The
adaptableContextproperty in Adaptable Options allows individual context to be passed into AdapTable - This can then be leveraged at runtime as required
The adaptableContext property allows developers to provide application-specific "context".
Note
This object is very similar in intention to the AG Grid Context object
The property is set by developers in the root of Adaptable Options.
It is subsequently passed by AdapTable into the BaseContext object.
Note
BaseContextis the base object supplied to most functions / callbacks in Adaptable Options- It is also in the
xxxEventInfoobject included in all Adaptable Events
This allows developers to provide data or services which they can subsequently leverage elsewhere in AdapTable, e.g. in Custom Predicates or Display Formats.
Hint
This demo illustrates using Adaptable Context by providing a TimeZone Service leveraged by Custom Predicates
adaptableContext
Record<string, any>Custom Context for the Application