Home > widget-integration > RecommendationWidgetController > getDropdownOpenNodeKey

RecommendationWidgetController.getDropdownOpenNodeKey() method

Generates the CSS selector for open dropdown elements.

This method creates a CSS selector that targets dropdown elements in their opened state. Override this method to customize dropdown targeting or add additional CSS classes.

Signature:

getDropdownOpenNodeKey(widgetId: string): string;

Parameters

Parameter

Type

Description

widgetId

string

The unique identifier of the widget used to create specific selectors

Returns:

string

CSS selector string targeting open dropdown elements for the specified widget

Example

Override to add custom CSS classes for shop-specific styling:

public getDropdownOpenNodeKey(widgetId: string): string {
  const baseSelector = super.getDropdownOpenNodeKey(widgetId);
  return `${baseSelector}.custom-shop-dropdown-open`;
}