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.
Type Parameters
Section titled “Type Parameters”TFieldSlug
Section titled “TFieldSlug”TFieldSlug extends string = string
Union of this collection’s field slugs.
Properties
Section titled “Properties”bulkActions?
Section titled “bulkActions?”
optionalbulkActions?:object
Defined in: packages/core/src/collections/types.ts:220
Collection-wide: bulk action configuration.
delete?
Section titled “delete?”
optionaldelete?:boolean
Enable bulk delete action.
Default
Section titled “Default”trueDefault
Section titled “Default”{ delete: true }columns?
Section titled “columns?”
optionalcolumns?: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.
countLimit?
Section titled “countLimit?”
optionalcountLimit?: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.
Default
Section titled “Default”10000description?
Section titled “description?”
optionaldescription?:string
Defined in: packages/core/src/collections/types.ts:163
Shown in the view-identity popover/tooltip — admin.view/admin.views[n] only.
optionalname?:string
Defined in: packages/core/src/collections/types.ts:161
Tab label — admin.view/admin.views[n] only.
Default
Section titled “Default”“All” (admin.view only)
pageSize?
Section titled “pageSize?”
optionalpageSize?:number
Defined in: packages/core/src/collections/types.ts:178
pageSizeOptions?
Section titled “pageSizeOptions?”
optionalpageSizeOptions?:number[]
Defined in: packages/core/src/collections/types.ts:205
Collection-wide: available page-size options in the pagination controls.
Default
Section titled “Default”[10, 25, 50, 100]peekWidth?
Section titled “peekWidth?”
optionalpeekWidth?: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.
search?
Section titled “search?”
optionalsearch?:string
Defined in: packages/core/src/collections/types.ts:166
searchField?
Section titled “searchField?”
optionalsearchField?:TFieldSlug
Defined in: packages/core/src/collections/types.ts:167
searchFields?
Section titled “searchFields?”
optionalsearchFields?: readonlyTFieldSlug[]
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).
Default
Section titled “Default”undefined (search bar hidden)serverPageSize?
Section titled “serverPageSize?”
optionalserverPageSize?: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).
Default
Section titled “Default”100
optionalsort?:CollectionTableSort<TFieldSlug>
Defined in: packages/core/src/collections/types.ts:165
where?
Section titled “where?”
optionalwhere?:VexWhereNodeOf<unknown>
Defined in: packages/core/src/collections/types.ts:164