Skip to content

RequisitionListSelector Container

Provides a selector interface for choosing a requisition list when adding products from the catalog.

Version: 1.0.0

Configuration

The RequisitionListSelector container provides the following configuration options:

ParameterTypeReq?Description
canCreatebooleanNo (but the default value is true)Controls whether users can create new requisition lists from the selector dropdown. The default value is true if you don’t set this parameter to false, which restricts users from adding products to the existing lists. The false setting is useful when list creation should happen through a separate flow or requires additional permissions.
skustringYesSpecifies the product SKU to add to the selected requisition list. Required to identify the exact product variant being added. Must match a valid product SKU in your catalog.
selectedOptionsstring[]NoProvides an array of selected product option IDs for configurable products. Captures variant selections such as size, color, or other configurable attributes. Required for configurable products to identify the specific variant being added.
quantitynumberNoSets the quantity of the product to add to the requisition list. Defaults to 1 if not specified. Use to allow bulk additions or pre-populate quantities from previous orders or saved preferences.
beforeAddProdToReqListfunctionNoCallback function to handle validation before the Add to Requisition List dropdown opens when the button is clicked. Use to validate if the product can be added directly (for example, check if a configurable product needs options selected) and redirect to the product detail page if needed. If the callback throws an error or rejects, the dropdown will not open, enabling patterns like redirecting complex products to their detail pages.

Slots

This container does not expose any customizable slots.

Usage

The following example demonstrates how to use the RequisitionListSelector container:

import { render as provider } from '@dropins/storefront-requisition-list/render.js';
import { RequisitionListSelector } from '@dropins/storefront-requisition-list/containers/RequisitionListSelector.js';
await provider.render(RequisitionListSelector, {
sku: "PRODUCT-SKU-123",
canCreate: true,
selectedOptions: [],
})(block);