Skip to main content

Interface: UseProductSearchOptions

Defined in: composables/react/useProductSearch.ts:47

Options for useProductSearch.

Properties

applyOrderlists?

optional applyOrderlists?: boolean

Defined in: composables/react/useProductSearch.ts:73

Apply the orderlist filter on the search input. Defaults to true when orderlistIds is non-empty, false otherwise — so an authenticated user without a contract still sees the full catalogue.


availability?

optional availability?: Availability

Defined in: composables/react/useProductSearch.ts:91

Stock selection to filter by. 'all' or unset sends no stock filter. Filtering happens server-side, so itemsFound and the page count describe the filtered set.


brand?

optional brand?: string

Defined in: composables/react/useProductSearch.ts:57

Manufacturer/brand to filter by — also triggers a wide search.


categoryId?

optional categoryId?: number

Defined in: composables/react/useProductSearch.ts:53

Category id to list products from.


companyId?

optional companyId?: number

Defined in: composables/react/useProductSearch.ts:65

Active company id for company-scoped pricing/visibility.


configuration

configuration: object

Defined in: composables/react/useProductSearch.ts:101

Portal configuration: base category fallback plus image filters.

anonymousUserId?

optional anonymousUserId?: number

The channel's anonymous user, seeded by the host. Scopes logged-out listings exactly like the SSR seed does.

baseCategoryId?

optional baseCategoryId?: number

imageSearchFiltersGrid?

optional imageSearchFiltersGrid?: MediaImageProductSearchInput

imageVariantFiltersMedium?

optional imageVariantFiltersMedium?: TransformationsInput


graphqlClient?

optional graphqlClient?: GraphQLClient

Defined in: composables/react/useProductSearch.ts:49

GraphQL client; omit it together with a products array for controlled mode.


language?

optional language?: string

Defined in: composables/react/useProductSearch.ts:59

Language for product queries. Defaults to 'NL'.


minStock?

optional minStock?: number

Defined in: composables/react/useProductSearch.ts:93

Minimum stock quantity for the 'in-stock' selection.


onCategoryChange?

optional onCategoryChange?: (category) => void

Defined in: composables/react/useProductSearch.ts:120

Fires with the resolved category object after each category fetch.

Parameters

category

Category

Returns

void


onFiltersChange?

optional onFiltersChange?: (filters) => void

Defined in: composables/react/useProductSearch.ts:110

Fires with the available attribute filters from the category response.

Parameters

filters

AttributeFilter[]

Returns

void


onItemsFoundChange?

optional onItemsFoundChange?: (count) => void

Defined in: composables/react/useProductSearch.ts:114

Fires with the total matching item count whenever it changes.

Parameters

count

number

Returns

void


onPageChange?

optional onPageChange?: (page) => void

Defined in: composables/react/useProductSearch.ts:116

Fires when the current page changes.

Parameters

page

number

Returns

void


onPriceBoundsChange?

optional onPriceBoundsChange?: (min, max) => void

Defined in: composables/react/useProductSearch.ts:112

Fires with the min/max price bounds from the category response.

Parameters

min

number

max

number

Returns

void


onProductsResponse?

optional onProductsResponse?: (products) => void

Defined in: composables/react/useProductSearch.ts:118

Fires with the raw ProductsResponse after each category fetch.

Parameters

products

ProductsResponse

Returns

void


orderlistIds?

optional orderlistIds?: number[]

Defined in: composables/react/useProductSearch.ts:67

Scope the product fetch to specific orderlist IDs (e.g. a chosen B2B contract).


pageSize?

optional pageSize?: number

Defined in: composables/react/useProductSearch.ts:99

Page size. Defaults to 12.


priceFilterMax?

optional priceFilterMax?: number

Defined in: composables/react/useProductSearch.ts:85

Upper price bound filter.


priceFilterMin?

optional priceFilterMin?: number

Defined in: composables/react/useProductSearch.ts:83

Lower price bound filter.


products?

optional products?: (Product | Cluster)[]

Defined in: composables/react/useProductSearch.ts:51

When provided, the hook is controlled — it renders these products and skips fetching.


productTrackAttributes?

optional productTrackAttributes?: string[]

Defined in: composables/react/useProductSearch.ts:79

Attribute names to request per product, e.g. ['MPN']. Unset returns the first page of ALL attributes (12 per product), so products with more than 12 silently lose the rest — name what you render.


sortField?

optional sortField?: string

Defined in: composables/react/useProductSearch.ts:95

Sort field; overrides the internal sort state when set.


sortOrder?

optional sortOrder?: string

Defined in: composables/react/useProductSearch.ts:97

Sort direction ('ASC' / 'DESC'); overrides internal state when set.


taxZone?

optional taxZone?: string

Defined in: composables/react/useProductSearch.ts:61

Tax zone for price calculation. Defaults to 'NL'.


term?

optional term?: string

Defined in: composables/react/useProductSearch.ts:55

Free-text search term — triggers a wide search across the base category.


textFilters?

optional textFilters?: ProductTextFilterInput[]

Defined in: composables/react/useProductSearch.ts:81

Attribute text filters applied to the category search.


user?

optional user?: Contact | Customer | null

Defined in: composables/react/useProductSearch.ts:63

The signed-in user; supplies userId/contactId/customerId for pricing.