Home > widget-integration > CombinedProductListingsController > handleCombinedParentSwatchSelect

CombinedProductListingsController.handleCombinedParentSwatchSelect() method

Handles parent swatch selection for combined listing products. Matches variant by merged_options, resolves child, auto-selects first child variant. Equivalent to handleSwatchSelect but for combined-listing parent swatches.

Signature:

handleCombinedParentSwatchSelect(modal: HTMLElement, option: Element, variants: PreOrderVariant[], triggerUpdate: (selectedVariant: PreOrderVariant | null, modal: HTMLElement) => void): void;

Parameters

Parameter

Type

Description

modal

HTMLElement

option

Element

variants

PreOrderVariant[]

triggerUpdate

(selectedVariant: PreOrderVariant | null, modal: HTMLElement) => void

Returns:

void