BeechCMS / @beechcms/core / SelectOptions
Interface: SelectOptions
Properties
fields?
optionalfields?:string[]
Column projection. Empty = SELECT *.
filterLogic?
optionalfilterLogic?:"AND"|"OR"
How top-level filters groups are combined. Defaults to 'AND'.
filters?
optionalfilters?:FilterGroup[]
Filter groups. Joined by filterLogic (default AND); conditions within a group are always ANDed.
isCount?
optionalisCount?:boolean
When true, generates a COUNT(*) query instead of fetching rows. This omits projections, sorting/ordering clauses, and pagination limits/offsets, while keeping the join/where clauses intact for accurate counts.
kanbanOrder?
optionalkanbanOrder?:object
When set, LEFT JOIN kanban_positions and order by fractional index (KB-S04c/S05). Mutually exclusive with orderBy; if both present, kanbanOrder wins.
axisBranchId
axisBranchId:
string
seedSlug
seedSlug:
string
locale?
optionallocale?:SelectLocale
When set, filters and ORDER BY on localized branches compare the value resolved to locale.code (requested → default → first stored translation → legacy raw value) instead of the stored JSON. Absent: every column is compared raw, exactly as before localization existed.
orderBy?
optionalorderBy?:object
Sort column and direction. Ignored when kanbanOrder is set.
column
column:
string
dir
dir:
"ASC"|"DESC"
pagination?
optionalpagination?:object
LIMIT/OFFSET pagination.
limit
limit:
number
offset
offset:
number
resolveSeed?
optionalresolveSeed?: (slug) =>Seed|null|undefined
Resolves relation targets so search can match a relation display name (see resolveSearchSupport).
Parameters
slug
string
Returns
Seed | null | undefined
search?
optionalsearch?:string
Full-text search — uses FTS5 if the seed has indexable richtext/text branches.
status?
optionalstatus?:string|null
Filters by status. null = no status filter.
trashed?
optionaltrashed?:TrashedMode
Soft-delete visibility. Defaults to 'active': omitting it can never leak a trashed row.