GtBridge.Phlow.ColumnedList (gt_bridge v0.17.1)

Copy Markdown View Source

A Phlow columned list view specification.

Displays a list with multiple columns in GT's inspector.

Summary

Functions

Convert the columned list view to a dictionary format for serialization to GT.

Add a column to the view.

Set the items to display. Can be a list or a function that returns a list.

Set the priority of the view.

I transform each item before sending to GT on click-through.

Set the title of the view.

Types

t()

@type t() :: %GtBridge.Phlow.ColumnedList{
  columns: [GtBridge.Phlow.Column.t()],
  items_callback: (-> list()) | nil,
  send_callback: (any() -> any()) | nil,
  view_priority: integer(),
  view_title: String.t()
}

Functions

as_dict(self)

@spec as_dict(t()) :: map()

Convert the columned list view to a dictionary format for serialization to GT.

column(self, title, format_fn \\ nil)

@spec column(t(), String.t(), (any() -> String.t()) | nil) :: t()

Add a column to the view.

items(self, items_list)

@spec items(t(), list() | (-> list())) :: t()

Set the items to display. Can be a list or a function that returns a list.

priority(self, priority_value)

@spec priority(t(), integer()) :: t()

Set the priority of the view.

send(self, send_fn)

@spec send(t(), (any() -> any())) :: t()

I transform each item before sending to GT on click-through.

title(self, title_text)

@spec title(t(), String.t()) :: t()

Set the title of the view.