Skip to main content

Interface: UseProductSearchOptions

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

Options for useProductSearch.

Properties

brand?

optional brand?: string

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

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


categoryId?

optional categoryId?: number

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

Category id to list products from.


companyId?

optional companyId?: number

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

Active company id for company-scoped pricing/visibility.


configuration

configuration: object

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

Portal configuration: base category fallback plus image filters.

baseCategoryId?

optional baseCategoryId?: number

imageSearchFiltersGrid?

optional imageSearchFiltersGrid?: MediaImageProductSearchInput

imageVariantFiltersMedium?

optional imageVariantFiltersMedium?: TransformationsInput


graphqlClient?

optional graphqlClient?: GraphQLClient

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

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


language?

optional language?: string

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

Language for product queries. Defaults to 'NL'.


onCategoryChange?

optional onCategoryChange?: (category) => void

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

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:77

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:81

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:83

Fires when the current page changes.

Parameters

page

number

Returns

void


onPriceBoundsChange?

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

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

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:85

Fires with the raw ProductsResponse after each category fetch.

Parameters

products

ProductsResponse

Returns

void


pageSize?

optional pageSize?: number

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

Page size. Defaults to 12.


priceFilterMax?

optional priceFilterMax?: number

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

Upper price bound filter.


priceFilterMin?

optional priceFilterMin?: number

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

Lower price bound filter.


products?

optional products?: (Product | Cluster)[]

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

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


sortField?

optional sortField?: string

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

Sort field; overrides the internal sort state when set.


sortOrder?

optional sortOrder?: string

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

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


taxZone?

optional taxZone?: string

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

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


term?

optional term?: string

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

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


textFilters?

optional textFilters?: ProductTextFilterInput[]

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

Attribute text filters applied to the category search.


user?

optional user?: Contact | Customer | null

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

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