Table

Task Hit
GeneratedAssetSymbols.swift
Remote
CAS output swift dependencies: 0311864a9d4c1dsf1sa... (in target "App" from project "App")
CAS output swift dependencies: 0311864a9d4c1dsf1sa... (in target "App" from project "App")
CompileSwiftSources.swift
Local
LinkBinary
Missed
Attribute Type Documentation Default Value
Required id * :string

A uniqie identifier for the table

Required rows * :list

The table content

row_key :fun

A function to generate the row key. Required when using a LiveView stream. If using streams and not provided, defaults to the id key of the stream.

row_navigate :fun

A function to generate the link to navigate to when clicking on a row.

row_click :fun

A function to generate the click handler for a row.

row_expandable :fun

A function to determine if a row can be expanded. Returns true/false.

expanded_rows :list

A list of row keys/IDs that are currently expanded.

[]
empty_state :slot
Required col * :slot
Show slot attributes Hide slot attributes
label :string

The label of the column

icon :string

An icon to render next to the label

patch :string

A patch to apply to the column

<:col :let={i} label="Task">
  <.text_cell label={i.task} />
</:col>
<:col :let={i} label="Hit">
  <.badge_cell
    label={i.hit}
    color={case i.hit do
      "Remote" -> "primary"
      "Local" -> "success"
      "Missed" -> "warning"
    end}
    style="light-fill"
  />
</:col>
<:expanded_content :let={row}>
  <div :for={dep <- row.dependencies} style="margin-bottom: 12px; padding: 12px; background-color: var(--color-neutral-background-primary); border-radius: 6px;">
    <div style="color: var(--color-neutral-text-secondary); font-size: 14px;">
      {dep.description}
    </div>
  </div>
</:expanded_content>
expanded_content :slot

Content to display when a row is expanded

<:col :let={i} label="Task">
  <.text_cell label={i.task} />
</:col>
<:col :let={i} label="Hit">
  <.badge_cell
    label={i.hit}
    color={case i.hit do
      "Remote" -> "primary"
      "Local" -> "success"
      "Missed" -> "warning"
    end}
    style="light-fill"
  />
</:col>
<:expanded_content :let={row}>
  <div :for={dep <- row.dependencies} style="margin-bottom: 12px; padding: 12px; background-color: var(--color-neutral-background-primary); border-radius: 6px;">
    <div style="color: var(--color-neutral-text-secondary); font-size: 14px;">
      {dep.description}
    </div>
  </div>
</:expanded_content>