Skip to main content

Interface: ClusterOptionsProps

Defined in: components/ClusterOptions.tsx:72

Flattened render model for one cluster option group, precomputed to avoid calling state methods with arguments inside JSX.

Properties

className?

optional className?: string

Defined in: components/ClusterOptions.tsx:107

Extra CSS class applied to the root element.


clusterId

clusterId: number

Defined in: components/ClusterOptions.tsx:74

The cluster ID this options selector belongs to. Required.


currency?

optional currency?: string

Defined in: components/ClusterOptions.tsx:104

Currency symbol for prices. Defaults to '€'.


labels?

optional labels?: Record<string, string>

Defined in: components/ClusterOptions.tsx:98

Override any UI string. Available keys: required, selectRequired, selectOptional, requiredError


onOptionClear?

optional onOptionClear?: (optionId) => void

Defined in: components/ClusterOptions.tsx:95

Fired whenever the user clears an option (picks the empty/default entry in a non-required dropdown). Receives the option's id. Parents should remove that key from their selectedOptionProducts map so the price display drops the option's add-on price.

Parameters

optionId

number

Returns

void


onOptionSelect?

optional onOptionSelect?: (optionProduct) => void

Defined in: components/ClusterOptions.tsx:87

Fired whenever the user selects a product within any option group. Receives the full Product object of the chosen option product. Usually used to trigger a price update on the parent page.

Parameters

optionProduct

Product

Returns

void


options

options: ClusterOption[]

Defined in: components/ClusterOptions.tsx:80

An array of options that belong to the cluster. Required. Hidden options (option.hidden === 'Y') are automatically filtered out.


showErrors?

optional showErrors?: boolean

Defined in: components/ClusterOptions.tsx:101

When true, required options with no selection are highlighted with a validation error.