AdapTable Containers

View as Markdown

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, System Status Messages, the Settings Panel and Wizards, and Transposed Views.

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

All Container Options properties allow the container to be provided in one of 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 element ID:

CSS Selector used to target elements by CSS selectors (e.g. class, attribute, etc.) rather than elementID

PropertyTypeDescription
selectorstringCSS 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 (ShowInDiv) is to display details of the Alert in a Div element configured in the alertContainer property.

alertContainer

Default: undefined
Div where Alerts can appear

AdapTable, by default, displays the Settings Panel and Wizards (e.g. Format Column, Bulk Update) above the Grid, as either a centred modal or a draggable window (as set by the popupType property in Settings Panel Options and Wizard Options).

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

modalContainer

Default: undefined (rendered according to popupType)
Div in which the Settings Panel and Wizards are rendered

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

Find Out More

The full property list is in the Container Technical Reference