Base Tabular Classes

Shared base classes and supporting types for tabular views.

class BaseTableView(table, display_name=None, hidden=False)[source]

Bases: BaseView, FilterableView

Defines a simple, single-table view with various display and interaction configurations.

table

The ID of the table this view is built on.

Type:

str

fields

Field definitions to be included in the view, in display order.

Type:

List[ViewField]

can_move_rows

Whether the user can move rows around.

Type:

bool

can_change_size

Whether the table can grow/shrink in size.

Type:

bool

can_sort

Whether sorting is enabled.

Type:

bool

can_filter

Whether filtering is enabled.

Type:

bool

show_band_color

Whether to apply alternating row banding.

Type:

bool

band_odd_row_background_color

Background color for odd banded rows.

Type:

Optional[str]

band_even_row_background_color

Background color for even banded rows.

Type:

Optional[str]

background_color

Background color for the table itself.

Type:

Optional[str]

row_height

Fixed height for each row.

Type:

Optional[int]

column_width_adjustable

Whether users can manually resize columns.

Type:

bool

header_style

Style applied to all headers.

Type:

Optional[BaseStyle]

read_only_style

Style applied to read-only columns.

Type:

Optional[BaseStyle]

show_row_number

Whether to display row numbers.

Type:

bool

header_height

Height of the table headers.

Type:

Optional[int]

nested_headers

List of nested header configurations.

Type:

List[NestedHeaders]

table_height

Explicit height for the table, if any.

Type:

Optional[str]

only_display_nested_headers

Whether to show only the nested headers, hiding field-level headers.

Type:

bool

show_dropdowns_below

Whether dropdowns always appear below the editing cell.

Type:

bool

__init__(table, display_name=None, hidden=False)[source]

Initialize a BaseTableView instance.

Parameters:
  • table (Table) – The data table on which the view is based.

  • display_name (str | None) – Display name of the view. Defaults to the table’s

  • provided. (ID if not)

  • hidden (bool) – Whether the view is hidden in the UI. Defaults to False.

set_disable_table_controls(disable)[source]

Disables or enables user controls (row movement, resizing, sorting, filtering).

Return type:

BaseTableView

set_display_state(state, condition=None)[source]

Sets the display state and optional condition for the view.

Return type:

BaseTableView

set_use_filter(use_filter)[source]

Sets the filter component for this view.

Return type:

BaseTableView

class DisplayState(*values)[source]

Bases: Enum

Specifies the display state of a TableView or TreeView.

STANDARD

Standard view with black text and borders

READ_ONLY

Read only view with grey text and borders

PRESENTATION

Read only view with black text and no borders

STANDARD = 'STANDARD'
READ_ONLY = 'READ_ONLY'
PRESENTATION = 'PRESENTATION'
class NestedHeaders(label=None, colspan=None, collapsible=True, is_label_reference=False)[source]

Bases: Buildable

Represents a nested header definition for a table, allowing labels to span multiple columns and optionally be collapsible.

label

The display label of the header.

Type:

Optional[str]

colspan

Number of columns this header spans.

Type:

Optional[int]

collapsible

Whether the header group can be collapsed. Defaults to True.

Type:

bool

is_label_reference

Indicates if the label is a reference to another value. Defaults to False.

Type:

bool

label: str | None = None
colspan: int | None = None
collapsible: bool = True
is_label_reference: bool = False