Interface: SearchBarProps
Defined in: components/SearchBar.tsx:49
Properties
applyOrderlists?
optionalapplyOrderlists?:boolean
Defined in: components/SearchBar.tsx:170
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:179
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:160
Active company ID from the company switcher.
configuration?
optionalconfiguration?:any
Defined in: components/SearchBar.tsx:155
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:141
Additional class name for the container
currency?
optionalcurrency?:string
Defined in: components/SearchBar.tsx:120
Currency symbol for prices. Resolved from PropellerProvider when omitted; defaults to '€'.
debounceMs?
optionaldebounceMs?:number
Defined in: components/SearchBar.tsx:66
Debounce delay in milliseconds
formatPrice?
optionalformatPrice?: (price) =>string
Defined in: components/SearchBar.tsx:117
Custom price formatting function
Parameters
price
number
Returns
string
getResultHref?
optionalgetResultHref?: (result) =>string
Defined in: components/SearchBar.tsx:89
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:97
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:51
Propeller SDK GraphQL client. Resolved from PropellerProvider when omitted.
includeTax?
optionalincludeTax?:boolean
Defined in: components/SearchBar.tsx:132
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:144
Extra classes for the search input, merged over the defaults via tailwind-merge.
labels?
optionallabels?:Record<string,string>
Defined in: components/SearchBar.tsx:123
Labels for the component
language?
optionallanguage?:string
Defined in: components/SearchBar.tsx:57
Language code for search requests
maxResults?
optionalmaxResults?:number
Defined in: components/SearchBar.tsx:69
Maximum number of results to show in dropdown
minSearchLength?
optionalminSearchLength?:number
Defined in: components/SearchBar.tsx:63
Minimum characters before search triggers
noImageUrl?
optionalnoImageUrl?:string
Defined in: components/SearchBar.tsx:72
Fallback image URL when product has no image
onResultClick?
optionalonResultClick?: (result) =>void
Defined in: components/SearchBar.tsx:78
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:75
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:81
Fires when "View all results" is clicked. Receives the search term.
Parameters
term
string
Returns
void
orderlistIds?
optionalorderlistIds?:number[]
Defined in: components/SearchBar.tsx:163
Scope the autosuggest fetch to specific orderlist IDs (e.g. a chosen B2B contract).
placeholder?
optionalplaceholder?:string
Defined in: components/SearchBar.tsx:60
Placeholder text for the search input
priceLabels?
optionalpriceLabels?:Record<string,string>
Defined in: components/SearchBar.tsx:138
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:173
Attribute names to request per product, e.g. ['MPN']. See ProductGrid.
renderPrice?
optionalrenderPrice?: (result) =>ReactNode
Defined in: components/SearchBar.tsx:114
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:105
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:147
Tax zone used for price calculation. Defaults to 'NL'.
user?
optionaluser?:Contact|Customer|null
Defined in: components/SearchBar.tsx:54
The currently logged in user (Contact or Customer)