Skip to content

readableListViewSearchFields

readableListViewSearchFields<TFieldSlug>(props): TFieldSlug[]

Defined in: packages/core/src/collections/listView/listViewSearchFields.ts:22

Resolves the READABLE subset of collection.admin.view.state.searchFields, in config order (Decision 2: “the first entry is the default when the user starts typing”; Decision 26: “the client hides unreadable fields from … the search field picker”). Shared by resolveListViewSearchField and ListViewSearch’s own field picker, so both agree on which fields exist — ListViewSearch renders null when this is empty. Lives in @vexcms/core (Design Decision 44), not @vexcms/react, specifically so NextAdminPage (a server component) can call it directly — bundled next to a client component (CollectionListView/ListViewSearch) would tag the whole chunk "use client", which Next.js refuses to invoke server-side.

TFieldSlug extends string = string

Input props.

CollectionConfig

The collection whose admin.view.state.searchFields to filter.

ResolvedFieldPermissions

The caller’s resolved field-read permissions (useFieldPermissions).

TFieldSlug[]

The readable search fields, in declared order.