# Table

## <mark style="color:green;">class</mark> **UI.Table**

{% hint style="info" %}
This documentation is a work in progress. UI scripting is a new feature, and additional content is still being added. Stay tuned for updates!
{% endhint %}

<table><thead><tr><th width="334">Attribute</th><th>Value</th></tr></thead><tbody><tr><td>columns</td><td><p>a <code>list</code> of columns (<code>dict</code>)<br><br><code>column</code> properties:<br>type: <code>"tag"</code>, <code>"text"</code> or <code>"button"</code><br>label: any <code>string</code><br>buttons: a <code>list</code> of buttons (<code>dict</code>)</p><p></p><p><code>buttons</code> properties:<br>label: any <code>string</code><br>color: <code>default</code> | <code>danger</code><br>onClick: <code>func</code><br><br>This value is required.</p></td></tr><tr><td>rows</td><td><p>a <code>list</code> of rows (<code>dict</code>)</p><p></p><p>row structure (<code>dict</code>):</p><p><code>id</code>: <strong>Must be unique</strong>. Duplicate IDs can cause unexpected behavior and may result in incorrect UI rendering. Ensure each ID is distinct to avoid issues.</p><p><code>cells</code>: a <code>list</code> of cells that match the structure of <code>columns</code><br></p><p>cell structure (<code>dict</code>):</p><p>tag: <code>text</code>, <code>color</code></p><p>text: <code>text</code>, <code>subtext</code>, <code>imageUrl</code></p><p>button: <code>{}</code></p><p><br>Default: <code>[]</code></p></td></tr><tr><td>search</td><td><code>True | False</code><br><br>Default: <code>True</code></td></tr><tr><td>items_per_page</td><td>any <code>int</code><br><br>Default: <code>50</code></td></tr><tr><td>selectable</td><td><code>True | False</code><br><br>Default: <code>False</code></td></tr><tr><td>visible</td><td>See <a href="../..#visible">Visible</a>.<br><br>Default: <code>True</code></td></tr></tbody></table>

### Events

<table><thead><tr><th>Event</th><th width="286">Arguments</th><th>Description</th></tr></thead><tbody><tr><td>onSelectionChange</td><td>selected_rows (<code>list</code> of row ids)</td><td>Triggered when the selection changes.</td></tr></tbody></table>
