PhoenixFilament.Column (PhoenixFilament v0.1.0)

Copy Markdown View Source

A plain data struct representing a table column declaration.

Each column has a name (matching an Ecto schema field), an auto-humanized label, and a keyword list of options controlling display and behavior.

Supported Options

  • sortable: true — enable column header sorting
  • searchable: true — include in global text search
  • format: fn value, row -> ... end — custom cell formatting
  • badge: true — render cell value as a badge component
  • visible: false — hide column by default
  • preload: :association_name — preload association for this column

Summary

Functions

Creates a new Column struct. Label is auto-humanized from name unless provided in opts.

Creates a new Column struct. Alias for column/2.

Types

t()

@type t() :: %PhoenixFilament.Column{label: String.t(), name: atom(), opts: keyword()}

Functions

column(name, opts \\ [])

@spec column(
  atom(),
  keyword()
) :: t()

Creates a new Column struct. Label is auto-humanized from name unless provided in opts.

new(name, opts \\ [])

@spec new(
  atom(),
  keyword()
) :: t()

Creates a new Column struct. Alias for column/2.