AdapTable Containers

Summary

  • Developers can configure custom Div elements that will be used by AdapTable
  • These are configured using the ContainerOptions section of AdapTable Options

The Container Options section of Adaptable Options contains a series of properties allowing developers to specify various Div elements that can be used in Adaptable.

These include DIVs for Alerts and System Status Messages, Popups and Transposed Grids.

Important

  • 2 containers are also available allowing developers to provide custom div names for AdapTable and AG Grid
  • These are only required if using AdapTable vanilla - see Setting AdapTable & AG Grid Containers for more details

AdapTable provides properties in Container Options.

All properties allow the container to be provided in one 4 ways:

  • string — an element ID
  • AdaptableCssSelector — a CSS selector
  • HTMLElement — a direct reference to a DOM element
  • a JavaScript function which returns any one of the above
Deep Dive

Providing the Container Value

CSS Selector

The AdaptableCSSSelector object is used to locate a DOM element.

It contains a single selector property which is designed to target elements by CSS selectors (e.g. class, attribute, etc.) rather than elementID:

PropertyDescription
selectorCSS Selector that locates DOM element

The property can be used in multiple different ways, e.g.

selector: '#my-container'
selector: '.dashboard-panel'
selector: '[data-container="alerts"]' }

Alert Container

Alerts in AdapTable can be given a number of Alert behaviours.

One behaviour is to display details of the Alert in a Div elmement configured in the alertContainer property.

alertContainer

Default: undefined
Div where Alerts can appear

AdapTable, by default, will display the Settings Panel and popups in the centre of the screen above the Grid.

If this is not required behaviour, the modalContainer property can specify an alternative location.

modalContainer

Default: undefined (middle of screen used)
Div which contains AdapTable popups

System Status Container

AdapTable offers System Status Messages which will display important messages to run time users.

These can be displayed in various locations in the AdapTable UI, including in a custom div specified by using the systemStatusContainer property.

systemStatusContainer

Default: undefined
Div where System Status messages can appear

Transposed View Container

AdapTable supports displaying a transposed view of AG Grid data.

By default AdapTable displays the transposed content (grid and column selector) in a popup above AG Grid.

However developers can choose to display the Transposed View in any container of their choice by using the transposedViewContainer property.

Note

  • Transposed View content is rendered directly into this container without the default popup window chrome
  • This means that, by default, no header or close button are displayed, and the window is not draggable

Caution

The container is responsible for its own lifecycle; removing it from the DOM will cleanly unmount the Transposed View

transposedViewContainer

Default: undefined
Div where Transposed Views are displayed

Container Options Reference

This is the full list of properties available in Container Options:

PropertyDescriptionDefault
adaptableContainerDiv containing AdapTable; element Id, CSS Selector, HTMLElement, or function returning one of these"adaptable"
agGridContainerDiv containing AG Grid instance; element Id, CSS Selector, HTMLElement, or function returning one of these."grid"
alertContainerDiv to display Alerts; elementId, CSS Selector, HTMLElement, or function returning one of theseundefined
modalContainerName of div where popups appear;element Id, CSS Selector, HTMLElement, or function returning one of theseundefined (centre of screen)
systemStatusContainerDiv to show System Status Messages; elementId, CSS Selector, HTMLElement, or function returning one of theseundefined
transposedViewContainerDiv to render a Transposed View; elementId, CSS Selector, HTMLElement, or function returning one of theseundefined (rendered in a draggable popup window)