# Table

A Table layout shows the View's rows as a table with search, filters,
sorting, paging and row selection. The server answers one page at a time, so
a table stays fast on large sources. Choose **Table** as the layout's
**Type**; the sections below follow the layout's **Data** section, which
[Data Filtering](/docs/view/views/data-filtering.md) describes.

## Columns

- **Show columns toggle** adds a **Columns** button to the table, where
  people choose which columns they see.
- **Custom columns** adds computed columns, described below.
- **Hide columns** removes columns from the table entirely; people cannot
  show them again.
- **Initially visible** chooses the columns shown when the table opens. With
  the toggle on, people can show the others.
- **Enable sorting** turns on **Column order**, a list you drag to arrange
  the table's columns. The table shows its columns in that order; columns the
  list does not name follow them. Turning sorting off keeps the list but
  shows the columns in the source's order.

### Custom columns

**Add custom column** adds a column whose content is built from each row:

- **Column name**, its header.
- **Column type**: **Text**, **Link** or **HTML**.
- **Minimum width (px)**, its minimum width.
- **Value** for Text, **Link URL** and **Link label** for Link, or **HTML
  Code** for HTML.

The content may use row values in the form `{row.<column>.value}`; the field
suggests the available columns. For example `View: {row.post_title.value}`
shows "View: " followed by the row's title. Custom columns cannot be sorted
or edited.

## Filter

- **Show filter** shows the filter bar, where people add filters on any
  column and filter from the column headers.
- **Show search** shows the search field, which searches the source.
- **Show custom filters** shows a **Select Custom Filter** menu with the
  filters you define in **Custom filters** beneath it. Each has a **Filter
  name** and filter groups built the same way as the
  [Data filters](/docs/view/views/data-filtering.md); **All rows** clears the
  choice.

What people filter narrows the layout's Data filters and never widens them.

## Pagination

- **Show pagination** shows the page controls. Without them the table shows
  only its first 20 rows.
- **Show page size** lets people choose 10, 20, 50, 100, 250, 500 or 1000
  rows per page. A table opens with 20.

## Sorting

**Column to sort by** and **Sort order** (**Ascending** or **Descending**)
set the order the table opens in; a new layout sorts by date, newest first.
People can still sort by clicking a column header.

## Export

**Allow data export** adds an **Export** menu with CSV and Excel (`.xlsx`)
downloads, each in three scopes:

- **Export visible rows**: the rows of the current page, with the visible
  columns.
- **Export selected rows**: the rows selected in the table, with every
  column.
- **Export all rows**: every row that matches the current search and
  filters, with every column, read 500 at a time. A page shows at most 500
  rows.

The file is named after the View and the layout. A cell a spreadsheet would
run as a formula, one that starts with `=`, `+`, `-` or `@`, is exported as
text.

## Inline editing

**Allow inline editing** lets people edit a cell in place, for post type
sources only. It covers post fields, taxonomies, custom fields, and fields of
Advanced Custom Fields, Meta Box and JetEngine. Each change is saved at once,
and only when the user may edit that post.

## Conditions and delete

The layout's **Conditions** decide who sees its tab; every switch above
except **Enable sorting** can carry its own conditions once it is on. See
[Conditions](/docs/view/views/conditions.md). **Delete layout** removes the
layout when you save the View.
