ResolvedListViewQueryState
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:11
resolveListViewQueryState’s result — one list query’s fully-resolved, view-aware state, ready for buildListViewFindQueryArgs/buildListViewSearchQueryArgs (collections/listView/listViewQueryArgs.ts).
Type Parameters
Section titled “Type Parameters”TFieldSlug
Section titled “TFieldSlug”TFieldSlug extends string = string
Properties
Section titled “Properties”columns
Section titled “columns”columns:
ColumnEntry<TFieldSlug>[]
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:66
The FULL column list (Decision 48), ALWAYS complete — every one of
the collection’s own data fields, exactly once, in display order,
each a ColumnEntry (possibly carrying width/pinned/
hidden/enableSorting/enableHiding overrides). Resolved from
three layers, narrowest first (params.cols ?? viewState?.columns ?? collection.admin.view.state.columns), then completed
(completeListViewColumnOrder) so a field none of the three layers names
still gets a definite position (appended, declaration order,
explicitly hidden) — the SAME completion Decision 47 established,
now entry-aware. Every per-field width/sort/hide/pin value a
consumer (getCollectionColumnDefs, DataTable, NextAdminPage)
needs comes from passing an entry here through resolveListViewColumnConfig
— this function does not resolve those itself.
pageSize
Section titled “pageSize”pageSize:
number
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:19
peekWidth?
Section titled “peekWidth?”
optionalpeekWidth?:number
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:83
The active view’s OWN saved peek-panel width (px), undefined when it
never saved one (Decision, developer-approved “peek-resize” — the
default/most config views never do). Deliberately NOT merged with the
vex-admin:<collection> cookie’s own collection-wide peekWidth
default here — this function has no cookie access and stays pure,
exactly like columns above draws only from configView/sharedView/
collection; the caller (CollectionListView/ListViewModifiedControls’s
diff, Decision “peek-resize-view-sync” below) applies
?? initialPreferences.peekWidth itself. A local view’s own width
never reaches here either (its full state lives in the URL/localStorage,
Decision 41, not configView/sharedView) — CollectionListView’s own
view-sync effect (the same one that already re-syncs columnEntries once
localStorage hydrates) picks that case up directly from the merged
SavedListViewEntry.peekWidth instead.
search
Section titled “search”search:
string
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:17
"" means no search is active.
searchField
Section titled “searchField”searchField:
TFieldSlug|undefined
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:18
sort:
CollectionTableSort<TFieldSlug> |undefined
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:15
Parked (undefined) whenever search is non-empty (Design Decision 7) — callers must check search before reading this.
staleFilterField?
Section titled “staleFilterField?”
optionalstaleFilterField?:string
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:50
Set (to the field that was dropped) when a USER-added filter condition —
params.filter, or a shared/local view’s own saved where (NEVER a
declared/config view’s hidden where, which stays exempt and applied
regardless of field readability, Decision 11 of
access-system-fields.md) — names a field props.fieldPermissions
says the caller can’t read, and that condition was dropped from
where instead of being sent to the server (which would reject
it, Decision 26, leaving the user with a now-hidden chip and no way to
remove it — the gap this closes). undefined when props.fieldPermissions
was not supplied (the check is skipped entirely, matching the old
unguarded behavior) or when no condition needed dropping. Same
dismissible-notice shape as staleSortField/staleSearchField
— the saved view/URL itself is never rewritten.
staleSearchField?
Section titled “staleSearchField?”
optionalstaleSearchField?:string
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:34
Same as staleSortField, for searchField — set when the resolved
value no longer names one of collection.admin.view.state.searchFields.
staleSortField?
Section titled “staleSortField?”
optionalstaleSortField?:string
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:29
Set (to the field that was dropped) when the resolved sort.field — from a
shared/local view’s own saved state, or the raw URL — no longer exists on the
live collection or leads no declared index, and sort fell back to the
collection default’s own sort instead (polish fix, Decision 7). undefined
when sort needed no correction. The saved view itself is never rewritten —
this is a read-time degrade only, surfaced so the toolbar can show a dismissible
notice (“This view’s sort on ‘X’ is no longer available”).
where:
VexWhereNodeOf<unknown> |undefined
Defined in: packages/core/src/collections/listView/listViewQueryState.ts:13
A declared view’s (default or config) hidden filter ANDed with the caller’s own (Design Decision 25/45/48), or a shared/local view’s own filter, or just the caller’s filter.