Skip to main content

Interface: GridToolbarProps

Defined in: components/GridToolbar.tsx:18

Properties

activeTextFilters?

optional activeTextFilters?: 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?

optional className?: string

Defined in: components/GridToolbar.tsx:151

Extra CSS class applied to the root element.


defaultOffset?

optional defaultOffset?: number

Defined in: components/GridToolbar.tsx:52

Initially selected page size. Defaults to 12.


defaultSort?

optional defaultSort?: 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?

optional itemsFound?: 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?

optional labels?: 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?

optional offset?: number[]

Defined in: components/GridToolbar.tsx:46

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


onClearFilters?

optional onClearFilters?: () => void

Defined in: components/GridToolbar.tsx:129

Called when "Clear All" is clicked.

Returns

void


onFilterRemove?

optional onFilterRemove?: (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?

optional onOffsetChange?: (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?

optional onPriceFilterRemove?: () => void

Defined in: components/GridToolbar.tsx:124

Called when the price filter badge × is clicked.

Returns

void


onSortChange?

optional onSortChange?: (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?

optional onViewChange?: (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?

optional page?: 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?

optional pageItemCount?: 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?

optional pageSize?: 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?

optional portalMode?: 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?

optional priceFilterMax?: number

Defined in: components/GridToolbar.tsx:113

Currently active price filter upper bound.


priceFilterMin?

optional priceFilterMin?: 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?

optional sortOptions?: 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?

optional user?: 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?

optional viewMode?: string

Defined in: components/GridToolbar.tsx:40

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