Interface: GridToolbarProps
Defined in: components/GridToolbar.tsx:18
Properties
activeTextFilters?
optionalactiveTextFilters?:Record<string,string[]>
Defined in: components/GridToolbar.tsx:102
Currently active attribute filter selections. Key = attribute name, value = array of selected values. Used to render removable filter badges.
className?
optionalclassName?:string
Defined in: components/GridToolbar.tsx:151
Extra CSS class applied to the root element.
defaultOffset?
optionaldefaultOffset?:number
Defined in: components/GridToolbar.tsx:52
Initially selected page size. Defaults to 12.
defaultSort?
optionaldefaultSort?:object[]
Defined in: components/GridToolbar.tsx:30
Active sort — first element is used. Defaults to [{ field: 'CATEGORY_ORDER', order: 'DESC' }].
field
field:
string
order
order:
string
itemsFound?
optionalitemsFound?:number
Defined in: components/GridToolbar.tsx:76
Total products found — displayed as a result count on the left side. Pass 0 or undefined to hide the count.
labels?
optionallabels?:Record<string,string>
Defined in: components/GridToolbar.tsx:135
Label overrides. Supply any subset of DEFAULT_LABELS keys plus any of the ProductSortField key strings to customise display text.
offset?
optionaloffset?:number[]
Defined in: components/GridToolbar.tsx:46
Available page-size options shown in the per-page dropdown. Defaults to [12, 24, 48].
onClearFilters?
optionalonClearFilters?: () =>void
Defined in: components/GridToolbar.tsx:129
Called when "Clear All" is clicked.
Returns
void
onFilterRemove?
optionalonFilterRemove?: (filterName,value) =>void
Defined in: components/GridToolbar.tsx:119
Called when an attribute filter badge × is clicked. Receives the attribute name and the specific value to remove.
Parameters
filterName
string
value
string
Returns
void
onOffsetChange?
optionalonOffsetChange?: (offset) =>void
Defined in: components/GridToolbar.tsx:64
Called when the user selects a different per-page value. Receives the new page size number.
Parameters
offset
number
Returns
void
onPriceFilterRemove?
optionalonPriceFilterRemove?: () =>void
Defined in: components/GridToolbar.tsx:124
Called when the price filter badge × is clicked.
Returns
void
onSortChange?
optionalonSortChange?: (field,order) =>void
Defined in: components/GridToolbar.tsx:58
Called when the sort field or sort direction changes. Receives the new field key and direction ('ASC'|'DESC').
Parameters
field
string
order
string
Returns
void
onViewChange?
optionalonViewChange?: (mode) =>void
Defined in: components/GridToolbar.tsx:70
Called when the user clicks the view-mode toggle button. Receives the new mode: 'grid' or 'list'.
Parameters
mode
string
Returns
void
page?
optionalpage?:number
Defined in: components/GridToolbar.tsx:83
Current page number. Used together with pageSize and itemsFound
to display a range indicator (e.g. "1–10 from 594 results").
When omitted the component falls back to a simple total count.
pageItemCount?
optionalpageItemCount?:number
Defined in: components/GridToolbar.tsx:95
Actual number of items visible on the current page.
When provided, overrides pageSize for the range end calculation.
pageSize?
optionalpageSize?:number
Defined in: components/GridToolbar.tsx:89
Items per page. Used together with page and itemsFound
to compute the result range. Defaults to 12.
portalMode?
optionalportalMode?:string
Defined in: components/GridToolbar.tsx:142
Portal visibility mode. 'open' — price sorting is available for all users. 'semi-closed' — price sorting is disabled for unauthenticated users.
priceFilterMax?
optionalpriceFilterMax?:number
Defined in: components/GridToolbar.tsx:113
Currently active price filter upper bound.
priceFilterMin?
optionalpriceFilterMin?:number
Defined in: components/GridToolbar.tsx:108
Currently active price filter lower bound. When defined (together with or without priceFilterMax), renders a price badge.
sortOptions?
optionalsortOptions?:string[]
Defined in: components/GridToolbar.tsx:24
Sort field keys to show in the sort dropdown. Accepts keys of the ProductSortField enum (e.g. 'NAME', 'PRICE'). Defaults to all available sort fields.
user?
optionaluser?:Contact|Customer|null
Defined in: components/GridToolbar.tsx:148
Authenticated user object. When null/undefined in semi-closed mode the PRICE sort option is disabled.
viewMode?
optionalviewMode?:string
Defined in: components/GridToolbar.tsx:40
Layout mode: 'grid' or 'list'. Controls which icon the view-toggle button shows. Defaults to 'grid'.