Interface: SearchBarProps
Defined in: components/SearchBar.tsx:44
Properties
applyOrderlists?
optionalapplyOrderlists?:boolean
Defined in: components/SearchBar.tsx:165
Apply the orderlist filter. Defaults to true when orderlistIds is
non-empty, false otherwise — so an authenticated user without a contract
still sees the full catalogue.
clearSignal?
optionalclearSignal?:number
Defined in: components/SearchBar.tsx:174
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?
optionalcompanyId?:number
Defined in: components/SearchBar.tsx:155
Active company ID from the company switcher.
configuration?
optionalconfiguration?:any
Defined in: components/SearchBar.tsx:150
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?
optionalcontainerClassName?:string
Defined in: components/SearchBar.tsx:136
Additional class name for the container
currency?
optionalcurrency?:string
Defined in: components/SearchBar.tsx:115
Currency symbol for prices. Resolved from PropellerProvider when omitted; defaults to '€'.
debounceMs?
optionaldebounceMs?:number
Defined in: components/SearchBar.tsx:61
Debounce delay in milliseconds
formatPrice?
optionalformatPrice?: (price) =>string
Defined in: components/SearchBar.tsx:112
Custom price formatting function
Parameters
price
number
Returns
string
getResultHref?
optionalgetResultHref?: (result) =>string
Defined in: components/SearchBar.tsx:84
Build the destination URL for a result item. When provided, each result
renders as a real <a href> (middle-clickable, new-tab, crawlable) while
onResultClick still fires for SPA navigation. Omit to keep the
div-based fallback.
Parameters
result
SearchBarResult
Returns
string
getViewAllHref?
optionalgetViewAllHref?: (term) =>string
Defined in: components/SearchBar.tsx:92
Build the destination URL for the "View all results" CTA. When provided,
the CTA renders as a real <a href> (middle-clickable, new-tab, crawlable,
keyboard-focusable) while onViewAllClick still fires for SPA navigation.
Omit to keep the div-based fallback.
Parameters
term
string
Returns
string
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/SearchBar.tsx:46
Propeller SDK GraphQL client. Resolved from PropellerProvider when omitted.
includeTax?
optionalincludeTax?:boolean
Defined in: components/SearchBar.tsx:127
When true, the tax-inclusive (net) price leads; false shows tax-exclusive
(gross). Note the SDK mapping: price.net = incl. VAT, price.gross =
excl. VAT. Resolved from <PropellerProvider> when omitted; defaults to
false (excl.). Mirrors ProductCard/ProductPrice so the dropdown agrees
with every other price surface.
inputClassName?
optionalinputClassName?:string
Defined in: components/SearchBar.tsx:139
Extra classes for the search input, merged over the defaults via tailwind-merge.
labels?
optionallabels?:Record<string,string>
Defined in: components/SearchBar.tsx:118
Labels for the component
language?
optionallanguage?:string
Defined in: components/SearchBar.tsx:52
Language code for search requests
maxResults?
optionalmaxResults?:number
Defined in: components/SearchBar.tsx:64
Maximum number of results to show in dropdown
minSearchLength?
optionalminSearchLength?:number
Defined in: components/SearchBar.tsx:58
Minimum characters before search triggers
noImageUrl?
optionalnoImageUrl?:string
Defined in: components/SearchBar.tsx:67
Fallback image URL when product has no image
onResultClick?
optionalonResultClick?: (result) =>void
Defined in: components/SearchBar.tsx:73
Fires when a result item is clicked. Receives the result object.
Parameters
result
SearchBarResult
Returns
void
onSubmit?
optionalonSubmit?: (term) =>void
Defined in: components/SearchBar.tsx:70
Fires when the search form is submitted (Enter key). Receives the search term.
Parameters
term
string
Returns
void
onViewAllClick?
optionalonViewAllClick?: (term) =>void
Defined in: components/SearchBar.tsx:76
Fires when "View all results" is clicked. Receives the search term.
Parameters
term
string
Returns
void
orderlistIds?
optionalorderlistIds?:number[]
Defined in: components/SearchBar.tsx:158
Scope the autosuggest fetch to specific orderlist IDs (e.g. a chosen B2B contract).
placeholder?
optionalplaceholder?:string
Defined in: components/SearchBar.tsx:55
Placeholder text for the search input
priceLabels?
optionalpriceLabels?:Record<string,string>
Defined in: components/SearchBar.tsx:133
Labels for the incl./excl. price suffix. Keys: inclTax, exclTax.
Falls back to English 'incl. VAT' / 'excl. VAT'.
productTrackAttributes?
optionalproductTrackAttributes?:string[]
Defined in: components/SearchBar.tsx:168
Attribute names to request per product, e.g. ['MPN']. See ProductGrid.
renderPrice?
optionalrenderPrice?: (result) =>ReactNode
Defined in: components/SearchBar.tsx:109
Replace the price cell of each result with custom content. When provided,
this fully overrides the default price rendering (and showPrice) — return
any node (e.g. a "Price by quotation" label for a contract catalogue), or
null to render nothing for that result. Keeps price/quotation wording
app-specific rather than baked into the package.
Parameters
result
SearchBarResult
Returns
ReactNode
showPrice?
optionalshowPrice?:boolean
Defined in: components/SearchBar.tsx:100
Show the price column on each autosuggest result. Defaults to true.
Set false to hide prices entirely in the dropdown — e.g. a B2B
contract-catalogue context where prices are quote-only and shouldn't
appear in the live preview. Ignored when renderPrice is provided.
taxZone?
optionaltaxZone?:string
Defined in: components/SearchBar.tsx:142
Tax zone used for price calculation. Defaults to 'NL'.
user?
optionaluser?:Contact|Customer|null
Defined in: components/SearchBar.tsx:49
The currently logged in user (Contact or Customer)