[ type ] TableColumn

Description:

Table column configuration object used in Table components.

Type: Object

Properties:

Name Type Description

[text]

string

The text to be displayed in the column header. (Required when creating a new column)

[type]

string

Type of component to display/edit cell data. Possible values:

  • text - Plain text or HTML.
  • password - Masked password text field.
  • textarea - Multi-line text field.
  • icon - Displays an image loaded from the cell's value as a URL or path. Use table.onAction(callback) for click events.
  • button - A string of button names separated by "|". Use table.onAction(callback) for click events.
  • checkbox - Boolean check mark selection component.
  • combobox - Drop-down list of values, can be editable.
  • progress - Progress bar showing integer value 0–100.

[sorting]

Table.Sorting

Sorting mode. Table.Sorting.None disables sorting.

[icon_size]

number

For "icon" type, fixed width/height of the icon (largest dimension).

[cache_capacity]

number

For "icon" type, number of images cached in RAM.

[resizable]

boolean

Indicates if the column can be resized by the user.

[auto_resize]

boolean

Indicates if column auto-resizes with table (Has no effect if the table's auto-resize mode is Table.AutoResize.None).

[primary]

boolean

Indicates a column with primary data, such as a URL or file path, used as the data source for list generation or drag-and-drop operations.

[width]

number

Initial desired width of the column.

[min_width]

number

Minimum width column can be resized to.

[max_width]

number

Maximum width column can be resized to.

[hidden]

boolean

Whether the column is hidden by collapsing its width to 0.

[character]

string

The character used to mask input for the password type.

[min]

number

Minimum value for progress bar component when type is progress.

[max]

number

Maximum value for progress bar component when type is progress.

[show_text]

boolean

Whether to display the value as text inside the progress bar component when type is progress.

[editable]

boolean

Whether text fields are editable.

[clicksToEdit]

number

Number of clicks required to enter edit mode. Takes effect only when editable is true.

[background]

string | null

Background color of cells of the column.

[header_background]

string | null

Background color of a column header.

[color]

string | null

Text color of cells of the column.

[header_color]

string | null

Text color of a column header.

[font]

Font | null

Font of cells of a column.

[header_font]

Font | null

Font of a column header.

[align]

string

Text alignment in cells of the column.

[header_align]

string

Text alignment of a column header.

[options]

Array.<string>

List of values to choose from in a ComboBox component when type is combobox.

Examples:

Creating a simple column object:

let column = {
    text: "New Column",
    header_align: "center"
};

Also See: