Home > @shopware-pwa/helpers > isOptionAvailableForSelectedOptions

# isOptionAvailableForSelectedOptions() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Warning: This API is now obsolete.

  • the availability of the options is checked dynamically using API

Check if the current optionId is also present in matching option ids of other available variants.

Signature:

export declare function isOptionAvailableForSelectedOptions(currentAttribute: string, selectedOptionId: string, { code: optionId }: UiProductOption | undefined, allOptions: any, allSelectedOptions: {
    [key: string]: string;
}): boolean;

# Parameters

Parameter Type Description
currentAttribute string
selectedOptionId string
{ code: optionId } UiProductOption | undefined
allOptions any
allSelectedOptions { [key: string]: string; }

Returns:

boolean