Skip to content

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

RequireApprovalPurchaseOrders Container

Displays purchase orders that require approval from the currently authenticated user.

Version: 1.0.0-beta3

Configuration

The RequireApprovalPurchaseOrders container provides the following configuration options:

ParameterTypeReq?Description
initialPageSizePageSizeListProps[]YesThe 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.
routePurchaseOrderDetailsfunctionNoFunction to generate the URL for navigating to the purchase order details. Use to implement custom routing logic or add query 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 RequireApprovalPurchaseOrders container:

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