Adaptable

AdaptableTableView

Extends AdaptableBaseView

Declared in src/modules/view/State.ts

#Properties

23 props

#columnOrderstring[]

Ordered column ids for this view. Doubles as the inclusion list. Absent → all available columns (global merged with private) in definition order, filtered by includeColumns / excludeColumns.

Group columns listed here render at that position; unlisted group columns render first (in groupColumns key order).

#columnOverridesRecord<string, ColumnOverride>

Sparse per-column property overrides (width, pinned, aggregation, visible, …). When both are set, columnVisibility wins over columnOverrides.visible.

#columnSortingAdaptableColumnSorting[]

Specifies the sort order for columns in the current view.

#columnVisibilityRecord<string, false>

Hidden columns only (false values). Final say on visibility over column definitions and columnOverrides. Hidden columns keep their columnOrder position.

#contextMenustring

The id of the context menu to use for this view. To define context menus, use the contextMenu property in the AdaptableState.

#customSortsstring[]

#dataSourceAdaptableDataSourceConfig

Per-view data-loading override (rare — e.g. one view server-driven while the others are client-side). Merged per key over viewDefaults.dataSource and the instance-level config (Adaptable.DataSource component or the Provider dataSource prop).

#dateFormatstring | ((date: Date) => string)

Will be used in cells, where a cell value is a Date and no other explicit format is provided.

#excludeColumnsstring[]

These columns will not be made available to the view, even if they are defined in the globalEntities.availableColumns.

If a view.columnOrder includes any of these columns, they will be ignored.

#filters{ … }

  • #columnsstring[]

  • #gridstring

    AQL boolean expression every row must satisfy to be shown.

  • #paused{ … }

    Filters that stay in the view but are not applied — so a filter can be switched off and back on without losing it. grid pauses the grid filter. columns: true pauses every column filter; a record pauses only the listed column ids.

    • #columnsboolean | Record<string, boolean>

    • #gridboolean

  • #showFilterUIForColumnsboolean

    If not explicitly mentioned, it will default to the truthiness of the filters.columns property.

#flashingCellsstring[]

#groupColumnsRecord<string, GroupColumnConfig>

Synthetic group columns for this view, keyed by id. Configure like normal columns; columnOverrides / columnVisibility apply on top by id.

#idrequiredstring

View id.

This is the identifier of the view - mention this in AdaptableViewState.currentViewId to switch to this view.

import { Component } from '@angular/core';
import {
  AdaptableProvider,
  AdaptableWorkspace,
  type AdaptableUserState,
} from '@adaptabletools/datagrid-angular';
import { data } from '';

const defaultState: AdaptableUserState = {
  view: {
    currentViewId: 'main',
    views: [
      {
        View id - will be used in the currentViewId
        id: 'main',
        label: 'Main',
      },
    ],
  },
};

@Component({
  selector: 'demo-root',
  imports: [AdaptableProvider, AdaptableWorkspace],
  template: `
    <adaptable-provider adaptableId="app" primaryKey="id" [data]="data" [defaultState]="defaultState">
      <adaptable-workspace />
    </adaptable-provider>
  `,
})
export default class App {
  protected readonly data = data;
  protected readonly defaultState = defaultState;
}

#includeColumnsstring[]

Only those columns will be made available to the view.

If the view.columnOrder specifies other columns, they will be ignored.

#keyboardNavigationAdaptableKeyboardNavigation

How the arrow keys move around the grid: 'cell' moves an active cell, 'row' moves an active row and false turns keyboard navigation off.

When omitted, it is taken from viewDefaults.keyboardNavigation, and otherwise follows the selection mode: 'row' for 'single-row' and 'multi-row', 'cell' for the other modes.

#labelrequiredstring

#permissions{ … }

  • #deletableboolean

  • #editableboolean

#privateEntitiesAdaptableStateEntities

#rowGroupsStateAdaptableRowGroupsState

Which row groups are expanded or collapsed. Same shape as Infinite Table's groupRowsState. Discarded automatically when the view's grouping changes, since group keys from the previous grouping are no longer valid.

#selectionAdaptableSelection

Describes the selection mode of the view and, optionally, the selected rows or cells.

When mode is omitted, it is inferred from value, then taken from viewDefaults.selectionMode, and finally defaults to 'multi-cell'.

#singleColumnSortboolean

#sourceViewIdstring

When this view was created via clone, the id of the view it was cloned from (or that view's own sourceViewId). Used by persist hydration so non-serializable members (functions) resolve against the authored ancestor view.

#styledCellsstring[]

#Used by