Skip to main content

Interface: GridToolbarProps

Defined in: components/GridToolbar.tsx:19

Properties

activeTextFilters?

optional activeTextFilters?: Record<string, string[]>

Defined in: components/GridToolbar.tsx:109

Currently active attribute filter selections. Key = attribute name, value = array of selected values. Used to render removable filter badges.


availability?

optional availability?: Availability

Defined in: components/GridToolbar.tsx:137

Currently active availability (stock) selection. Renders a single removable chip when set to 'in-stock'.


className?

optional className?: string

Defined in: components/GridToolbar.tsx:170

Extra CSS class applied to the root element.


defaultOffset?

optional defaultOffset?: number

Defined in: components/GridToolbar.tsx:59

Initially selected page size. Defaults to 12.


defaultSort?

optional defaultSort?: object[]

Defined in: components/GridToolbar.tsx:37

Active sort — first element is used. Defaults to [{ field: 'CATEGORY_ORDER', order: 'DESC' }].

field

field: string

order

order: string


hidePriceSort?

optional hidePriceSort?: boolean

Defined in: components/GridToolbar.tsx:31

Hide the price-ascending/descending sort options entirely. Default: false. Useful for closed B2B portals where prices are "by quotation".


itemsFound?

optional itemsFound?: number

Defined in: components/GridToolbar.tsx:83

Total products found — displayed as a result count on the left side. Pass 0 or undefined to hide the count.


labels?

optional labels?: Record<string, string>

Defined in: components/GridToolbar.tsx:154

Label overrides. Supply any subset of DEFAULT_LABELS keys plus any of the ProductSortField key strings to customise display text.


minStock?

optional minStock?: number

Defined in: components/GridToolbar.tsx:140

Currently active minimum stock quantity, shown on the chip above the default.


offset?

optional offset?: number[]

Defined in: components/GridToolbar.tsx:53

Available page-size options shown in the per-page dropdown. Defaults to [12, 24, 48].


onAvailabilityFilterRemove?

optional onAvailabilityFilterRemove?: () => void

Defined in: components/GridToolbar.tsx:143

Called when the availability filter badge × is clicked.

Returns

void


onClearFilters?

optional onClearFilters?: () => void

Defined in: components/GridToolbar.tsx:148

Called when "Clear All" is clicked.

Returns

void


onFilterRemove?

optional onFilterRemove?: (filterName, value) => void

Defined in: components/GridToolbar.tsx:126

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?

optional onOffsetChange?: (offset) => void

Defined in: components/GridToolbar.tsx:71

Called when the user selects a different per-page value. Receives the new page size number.

Parameters

offset

number

Returns

void


onPriceFilterRemove?

optional onPriceFilterRemove?: () => void

Defined in: components/GridToolbar.tsx:131

Called when the price filter badge × is clicked.

Returns

void


onSortChange?

optional onSortChange?: (field, order) => void

Defined in: components/GridToolbar.tsx:65

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?

optional onViewChange?: (mode) => void

Defined in: components/GridToolbar.tsx:77

Called when the user clicks the view-mode toggle button. Receives the new mode: 'grid' or 'list'.

Parameters

mode

string

Returns

void


page?

optional page?: number

Defined in: components/GridToolbar.tsx:90

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?

optional pageItemCount?: number

Defined in: components/GridToolbar.tsx:102

Actual number of items visible on the current page. When provided, overrides pageSize for the range end calculation.


pageSize?

optional pageSize?: number

Defined in: components/GridToolbar.tsx:96

Items per page. Used together with page and itemsFound to compute the result range. Defaults to 12.


portalMode?

optional portalMode?: string

Defined in: components/GridToolbar.tsx:161

Portal visibility mode. 'open' — price sorting is available for all users. 'semi-closed' — price sorting is disabled for unauthenticated users.


priceFilterMax?

optional priceFilterMax?: number

Defined in: components/GridToolbar.tsx:120

Currently active price filter upper bound.


priceFilterMin?

optional priceFilterMin?: number

Defined in: components/GridToolbar.tsx:115

Currently active price filter lower bound. When defined (together with or without priceFilterMax), renders a price badge.


sortOptions?

optional sortOptions?: string[]

Defined in: components/GridToolbar.tsx:25

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?

optional user?: Contact | Customer | null

Defined in: components/GridToolbar.tsx:167

Authenticated user object. When null/undefined in semi-closed mode the PRICE sort option is disabled.


viewMode?

optional viewMode?: string

Defined in: components/GridToolbar.tsx:47

Layout mode: 'grid' or 'list'. Controls which icon the view-toggle button shows. Defaults to 'grid'.