Adaptable

#Workspace

<Adaptable.Workspace /> places a main pane beside the settings panel, with a resizable split between them. By default the main pane is the full Adaptable.UI (dashboard, grid and overlays) and the panel sits below it.

<Adaptable.Provider {...props}>
  <Adaptable.Workspace settingsPanel="right" />
</Adaptable.Provider>

#The settings panel

settingsPanel prop takes a position — 'left', 'right', 'top' or 'bottom' (default) — or a config object:

<Adaptable.Workspace
  settingsPanel={{
    position: 'left',
    defaultSize: 420,
    minSize: 360,
    defaultItemId: 'view-sorting',
  }}
  main="grid"
/>
  • children — replaces the settings panel with your own content.
  • className — a class on the panel slot.
  • defaultItemId — the settings page shown first (default 'views').
  • defaultSize — the initial panel size along the split (default 620 for a side panel, 360 for a stacked one). minSize (default 320) and maxSize bound the resize. All three take pixels or a CSS length such as '30%', '20rem' or 'calc(100% - 600px)'; percentages are relative to the workspace.
  • position — where the panel sits. left and right split horizontally, top and bottom stack vertically.
  • renderCollapsed — what stays on the panel's edge while it is collapsed; see Collapsing.
  • size / onSizeChange — control the size. onSizeChange is called with the size in pixels once a resize is committed (pointer up, or a keyboard resize).

settingsPanel={false} renders the main pane alone; the settings pages then open in a dialog.

#
Settings panel below the grid

The panel sits below the grid and opens on the Sorting page. The main pane is just the grid (main="grid"). Drag the gap between them to resize.

open
loading demo…

#Settings page ids

defaultItemId, Adaptable.UI.SettingsPanel's itemId and adaptableApi.settingsPanelApi.showSettingsPanel(id) take one of these ids:

GroupPages
Gridviews, view-columns, view-sorting, view-grouping, view-aggregations, view-filter, view-selection
Datacalculated-columns, named-queries, export
Stylingstyled-cells, flashing-cells, theme
Alerts & Messagescell-notes, alerts
Searchquick-search
Layoutdashboard

The view-* pages edit the current view. For a pivot view, view-columns edits the pivot columns, view-grouping the row groups, and there is no view-filter page.

#The main pane

main picks the built-in main pane: 'ui' (default) for the full Adaptable.UI, or 'grid' for Adaptable.UI.DataGrid without the dashboard (the overlays are still included). Pass children to use your own layout instead — any mix of the UI components or any other JSX. Unless it contains Adaptable.UI, include <Adaptable.UI.Overlays /> once (for notifications and cell notes).

#Collapsing

The panel collapses from the button in its header and expands from the strip left on its edge. While collapsed, the strip shows the expand button followed by an icon per settings page; clicking an icon expands the panel on that page.

  • collapsible={false} keeps the panel always open.
  • showIconsWhenCollapsed={false} leaves only the expand button on the strip.
  • settingsPanel.renderCollapsed replaces the strip's content. It receives { position, orientation, expand, expandButton, items }: expand(itemId?) expands the panel (on a page, when given), expandButton is the default button and items lists the settings pages (id, label, description, icon, group) in sidebar order. Pass renderCollapsed: false to leave nothing on the edge and expand the panel from elsewhere.

The collapsed flag is state.config.settingsPanelCollapsed, so it persists with the rest of the state, and you can set it in defaultState. Toggle it from anywhere inside the provider with <Adaptable.Workspace.Toggle /> — pass it the panel's position so it shows the matching icon — or with adaptableApi.settingsPanelApi.toggleCollapsed(), expand() and collapse().

#
A custom layout

A toolbar with Adaptable.UI.ViewPicker, Adaptable.UI.QuickSearch and Adaptable.Workspace.Toggle, above an Adaptable.Workspace whose main pane is Adaptable.UI.ColumnChooser next to Adaptable.UI.DataGrid.

The panel starts collapsed and renderCollapsed: false leaves nothing on its edge — click the toggle on the right of the toolbar to open it.

open
loading demo…

#A custom split

Adaptable.Workspace covers a main pane and one panel. For more panes, or a split of your own, compose Adaptable.UI (or Adaptable.UI.DataGrid) and Adaptable.UI.SettingsPanel yourself — see UI components.

#Props

7 props

#childrenReactNode

The main pane, replacing the built-in one picked by main.

#classNamestring

Class name on the workspace root element.

#collapsiblebooleandefault: true

Whether the settings panel can be collapsed. The collapsed flag is state.config.settingsPanelCollapsed, so it persists with the rest of the state; toggle it with adaptableApi.settingsPanelApi.toggleCollapsed() or render Adaptable.Workspace.Toggle anywhere inside the provider. The built-in panel gets a collapse button in its header; a replacement panel (settingsPanel.children) supplies its own.

#main'ui' | 'grid'default: 'ui'

Built-in main pane, used when children are omitted. 'ui' is Adaptable.UI (dashboard, grid and overlays). 'grid' is Adaptable.UI.DataGrid with Adaptable.UI.Overlays. Custom children render Adaptable.UI.Overlays themselves (it comes with Adaptable.UI).

#settingsPanelAdaptableWorkspacePanelPosition | AdaptableWorkspaceSettingsPanelConfig | false | nulldefault: 'bottom'

Settings panel placement. A position ('left' | 'right' | 'top' | 'bottom') or a config object. false or null renders the main pane alone; When the settings panel is not rendered, the settings will open in a dialog.

#showIconsWhenCollapsedbooleandefault: true

While collapsed, show an icon per settings page after the expand button; clicking one expands the panel on that page. Ignored when settingsPanel.renderCollapsed or settingsPanel.children is set.

#styleCSSProperties

Inline styles for the workspace root element.