Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

ApprovalRulesList Container

Displays a list of purchase order approval rules with options to create, edit, and view rule details.

Version: 1.0.0-beta3

Configuration

The ApprovalRulesList container provides the following configuration options:

ParameterTypeReq?Description
initialPageSizePageSizeListProps[]NoThe initial number of items to display per page in the approval rules table. Use to control default pagination based on screen size or user preferences.
routeCreateApprovalRulefunctionNoFunction to generate the URL for creating a new approval rule. Use to implement custom routing or add context parameters for rule creation.
routeEditApprovalRulefunctionNoFunction to generate the URL for editing an approval rule. Receives the rule ID. Use to implement custom routing or add context parameters.
routeApprovalRuleDetailsfunctionNoFunction to generate the URL for viewing approval rule details. Receives the rule ID. Use to implement custom routing or add context parameters.
setColumnsfunctionNoFunction to customize the table columns displayed. Receives default columns and returns modified columns. Use to show/hide columns, reorder them, or add custom column definitions based on user roles or preferences.
setRowsDatafunctionNoFunction to transform or filter the row data before display. Receives default rows and returns modified rows. Use to add custom data processing, formatting, or filtering logic.
classNamestringNoAdditional CSS classes to apply to the container for custom styling.
withHeaderbooleanNoWhen true, displays the header section. Set to false when embedding the container within a layout that provides its own header.
withWrapperbooleanNoWhen true, wraps the container in a styled wrapper. Set to false for custom styling or when the container is embedded within another styled component.
skeletonRowCountnumberNoNumber of skeleton rows to display while loading data. Use to provide visual feedback during data fetching and improve perceived performance.

Slots

This container does not expose any customizable slots.

Usage

The following example demonstrates how to use the ApprovalRulesList container:

import { render as provider } from '@dropins/storefront-purchase-order/render.js';
import { ApprovalRulesList } from '@dropins/storefront-purchase-order/containers/ApprovalRulesList.js';
await provider.render(ApprovalRulesList, {
initialPageSize: [],
routeCreateApprovalRule: routeCreateApprovalRule,
routeEditApprovalRule: routeEditApprovalRule,
})(block);