Home > widget-integration > FilterController > filterOptionCollapse

FilterController.filterOptionCollapse() method

Toggles the collapse state of a filter option Manages collapse/expand behavior for both mobile and desktop layouts

Signature:

filterOptionCollapse(action: {
		actionId: string;
		elementId?: string;
		targets?: Array<{
			targetId: string;
			classToggle: string;
			shouldAddClass?: boolean;
		}>;
	}, target?: HTMLElement): void;

Parameters

Parameter

Type

Description

action

{ actionId: string; elementId?: string; targets?: Array<{ targetId: string; classToggle: string; shouldAddClass?: boolean; }>; }

Action object containing actionId and targets configuration

target

HTMLElement

(Optional)

Returns:

void