Home > widget-integration > QuickViewController > getSwatchGroupIndex

QuickViewController.getSwatchGroupIndex() method

Position of the swatch group that owns option, matching the order of options_with_values (and therefore of variant titles and merged_options). Returns -1 when the option is not inside a swatch group.

Signature:

protected getSwatchGroupIndex(option: Element): number;

Parameters

Parameter

Type

Description

option

Element

Returns:

number