Apply ICollectionState to an ICollection

Typically used in a Gallery or Catalog component to set the inital state, based on values deserialized from a query string


Parameter Type Default Notes
collection Required ICollection
state Required ICollectionState


Property Type Notes
key string
label string
sortOption ISortOption
defaultQuery Optional string
facets Optional IFacet[]
filter Optional Filter<FilterType>
filterType Optional FilterType

Filter Type used in this collection

include Optional string[]

Specify the includes to be requested when working with this collection

scope Optional Array<IFilterGroup<FilterType>>

Scope is a set of FilterGroups which define the limits of the Collection. Typically it is just a set of group ids, but it may be arbitrarily complex. If one was to "search the collection", this is the description of what would be returned.

Function defined in common/src/search/collectionState.ts:22