SelectColumn extends SpreadsheetColumn

Dropdown column for Spreadsheet. Edits with a bound <select> (Input.create) built from options.

Constructor

new SelectColumn(options)
options : Object optional
options : Array optional

allowed values; strings, or { value, label }

attribute : string optional

record key this column reads/writes

editable : boolean optional

whether cells can be edited/pasted into

input : Object optional

extra options merged into Input.create (e.g. dump/load)

contextMenu : function optional

hook (menu, cell, column) to augment/replace the right-click menu

index : number optional

0-based column position (assigned by the grid)

width : number | string optional

explicit column width (px number or CSS px string); falls back to the grid's default width when omitted

frozen : boolean optional

pin this column to the left while the body scrolls

header : function | string optional

header content; function receives (column, grid)

render : function optional

cell content renderer; receives (record, cell, column, grid)

value : function optional

optional override for the copy/serialized value; receives (record, column). Defaults to the render result.

class : string optional

extra class(es) applied to header + cells

unnest : function optional

expand the record's nested collection into stacked sub-rows for this cell (SQL UNNEST/explode). A function (record) => Array returning the sub-records to stack (read-only display in v1)

splitInto : function optional

deprecated alias for unnest

record : function optional

resolve the record this column reads/writes from the row's record (e.g. a row TIM → its Trait). A function (rowRecord) => record | Promise<record>. When omitted the column operates on the row's record directly. renderContent/valueFor and (for Spreadsheet) input/paste/clear/toggle all operate on the resolved record.

Instance Properties

Extra Input.create options merged into every editor (override per type, e.g. number dump).

Input kind passed to Input.create; overflow-friendly rich text by default (mirrors Spreadsheet).

MIME types this column accepts on paste.

Instance Methods

A CellHandle for this column at a 0-based row index (or null).

CellHandles for this column across the whole dataset (lazy, transient).

Clear the record's value.

Per-column customization of the right-click context menu (mirrors Spreadsheet). Receives the built menu element and returns the (possibly augmented or replaced) menu. Defaults to returning the menu unchanged; supply a contextMenu option to override.

Parameters

menu : HTMLElement

Returns

HTMLElement

Resolve header content.

Build a Select editor; session.value (type-to-edit) seeds the typeahead.

Parse a pasted/typed string into the stored value. Override per type.

Apply a pasted value to the record.

Resolve the display content for a record (string / node / dolla descriptor).

Resolve the record this column reads/writes from the row's record. With a record resolver a cell can edit a sub-record (e.g. a row TIM → its Trait) while the row stays the row record. Returns the row record unchanged when no resolver is set. May return a Promise (resolvers are often async); callers await as needed.

Resolve the copy/serialized value for a record (string).