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?
optionalclassName?: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?
optionalcurrency?:string
Defined in: components/ClusterOptions.tsx:104
Currency symbol for prices. Defaults to '€'.
labels?
optionallabels?:Record<string,string>
Defined in: components/ClusterOptions.tsx:98
Override any UI string. Available keys: required, selectRequired, selectOptional, requiredError
onOptionClear?
optionalonOptionClear?: (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?
optionalonOptionSelect?: (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?
optionalshowErrors?:boolean
Defined in: components/ClusterOptions.tsx:101
When true, required options with no selection are highlighted with a validation error.