Skip to main content

Interface: SearchBarProps

Defined in: components/SearchBar.tsx:34

Properties

clearSignal?

optional clearSignal?: number

Defined in: components/SearchBar.tsx:100

Bump this counter to clear the search input from outside (e.g. on route change). Each unique value triggers a one-time reset of the local term.


companyId?

optional companyId?: number

Defined in: components/SearchBar.tsx:94

Active company ID from the company switcher.


configuration?

optional configuration?: any

Defined in: components/SearchBar.tsx:89

Configuration object providing: imageSearchFiltersGrid, imageVariantFiltersMedium — passed to CategoryService baseCategoryId — used when querying by term or brand urls.getProductUrl / urls.getClusterUrl — for card URL generation


containerClassName?

optional containerClassName?: string

Defined in: components/SearchBar.tsx:78

Additional class name for the container


currency?

optional currency?: string

Defined in: components/SearchBar.tsx:72

Currency symbol for prices. Resolved from PropellerProvider when omitted; defaults to '€'.


debounceMs?

optional debounceMs?: number

Defined in: components/SearchBar.tsx:51

Debounce delay in milliseconds


formatPrice?

optional formatPrice?: (price) => string

Defined in: components/SearchBar.tsx:69

Custom price formatting function

Parameters

price

number

Returns

string


graphqlClient?

optional graphqlClient?: GraphQLClient

Defined in: components/SearchBar.tsx:36

Propeller SDK GraphQL client. Resolved from PropellerProvider when omitted.


labels?

optional labels?: Record<string, string>

Defined in: components/SearchBar.tsx:75

Labels for the component


language?

optional language?: string

Defined in: components/SearchBar.tsx:42

Language code for search requests


maxResults?

optional maxResults?: number

Defined in: components/SearchBar.tsx:54

Maximum number of results to show in dropdown


minSearchLength?

optional minSearchLength?: number

Defined in: components/SearchBar.tsx:48

Minimum characters before search triggers


noImageUrl?

optional noImageUrl?: string

Defined in: components/SearchBar.tsx:57

Fallback image URL when product has no image


onResultClick?

optional onResultClick?: (result) => void

Defined in: components/SearchBar.tsx:63

Fires when a result item is clicked. Receives the result object.

Parameters

result

SearchBarResult

Returns

void


onSubmit?

optional onSubmit?: (term) => void

Defined in: components/SearchBar.tsx:60

Fires when the search form is submitted (Enter key). Receives the search term.

Parameters

term

string

Returns

void


onViewAllClick?

optional onViewAllClick?: (term) => void

Defined in: components/SearchBar.tsx:66

Fires when "View all results" is clicked. Receives the search term.

Parameters

term

string

Returns

void


placeholder?

optional placeholder?: string

Defined in: components/SearchBar.tsx:45

Placeholder text for the search input


taxZone?

optional taxZone?: string

Defined in: components/SearchBar.tsx:81

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


user?

optional user?: Contact | Customer | null

Defined in: components/SearchBar.tsx:39

The currently logged in user (Contact or Customer)