Skip to content

VexViewState

VexViewState<TFieldSlug> = object

Defined in: packages/core/src/collections/types.ts:159

One saved view’s filter/sort/search/column/page-size state, PLUS (Decision 45’s FINAL revision) the collection-wide list settings that used to live on the now-deleted admin.table — admin.view’s own input type and VexViewConfig’s state are the SAME type, a superset, every key optional. An admin.views[n] entry may therefore override collection-wide settings too, not just its own per-view query state (validateSavedListViewConfig / defineCollection resolve an unset collection-wide key against admin.view’s own resolved value, then the global default — the same two-tier fallback admin.view itself already uses against the global default, one level deeper). name/description are meaningful only for admin.view/admin.views[n] entries, which have no separate identity wrapper of their own the way a VexViewConfig does (its name/ description live OUTSIDE state, unused here) — a shared/local view never sets them on its own state.

where is collection-structure-agnostic (VexWhereNodeOf<unknown>): a saved/URL view is a portable JSON blob, not re-validated against the owning collection’s exact field union until it is applied. On a config view, where’s field names ARE checked against the real collection, but at defineCollection time (validateSavedListViewConfig), not by this type.

TFieldSlug extends string = string

Union of this collection’s field slugs.

optional bulkActions?: object

Defined in: packages/core/src/collections/types.ts:220

Collection-wide: bulk action configuration.

optional delete?: boolean

Enable bulk delete action.

true
{ delete: true }

optional columns?: ColumnEntry<TFieldSlug>[]

Defined in: packages/core/src/collections/types.ts:177

The view’s FULL column display order (Decision 45/47/48), visible or not, in display order — see ColumnEntry. A saved view from before this unification only ever listed its VISIBLE fields as bare slugs (the original Decision 11 shape); that shape still parses correctly here (every entry is a valid bare-slug ColumnEntry), and resolveListViewQueryState’s completion step appends any field it doesn’t name, in field-declaration order, as hidden.


optional countLimit?: number

Defined in: packages/core/src/collections/types.ts:212

Collection-wide: caps the total-count scan on the list’s first page (Decision 35): find counts with take(countLimit + 1) instead of .collect(), and returns totalDocsCapped: true once the cap is hit.

10000

optional description?: string

Defined in: packages/core/src/collections/types.ts:163

Shown in the view-identity popover/tooltip — admin.view/admin.views[n] only.


optional name?: string

Defined in: packages/core/src/collections/types.ts:161

Tab label — admin.view/admin.views[n] only.

“All” (admin.view only)


optional pageSize?: number

Defined in: packages/core/src/collections/types.ts:178


optional pageSizeOptions?: number[]

Defined in: packages/core/src/collections/types.ts:205

Collection-wide: available page-size options in the pagination controls.

[10, 25, 50, 100]

optional peekWidth?: number

Defined in: packages/core/src/collections/types.ts:189

The Inspect peek panel’s width in px, resized by dragging its left edge (Decision, developer-approved “peek-resize”) — undefined means this view never saved an explicit width, so switching TO it leaves whatever width is currently in the vex-admin:<collection> cookie untouched (the SAME “no explicit value means inherit” rule pageSize already follows). Clamped client-side to [PEEK_PANEL_MIN_WIDTH_PX, 60% of the viewport] on both drag and read.


optional search?: string

Defined in: packages/core/src/collections/types.ts:166


optional searchField?: TFieldSlug

Defined in: packages/core/src/collections/types.ts:167


optional searchFields?: readonly TFieldSlug[]

Defined in: packages/core/src/collections/types.ts:200

Collection-wide: fields the list search bar queries, in picker order — the first entry is the default when the user starts typing. Each entry must name a field declaring its own searchIndex; checked by validateSavedListViewConfig. Omit (on admin.view, with no admin.views[n] override either) to hide the search bar entirely. Renamed, plural, from the deleted admin.table.searchField (Decision 45 FINAL — stops colliding with this same type’s own per-view singular searchField).

undefined (search bar hidden)

optional serverPageSize?: number

Defined in: packages/core/src/collections/types.ts:218

Collection-wide: default number of items per page fetched from the server (Step 8 — always at least pageSize, the client page size).

100

optional sort?: CollectionTableSort<TFieldSlug>

Defined in: packages/core/src/collections/types.ts:165


optional where?: VexWhereNodeOf<unknown>

Defined in: packages/core/src/collections/types.ts:164