Dashral Pro is on the wayGet 30% off at launch

Dashral

Orders table

Search, payment and fulfillment filters, export and pages; ship selected orders and the rows update in place.

$ pnpm dlx shadcn@latest add @dashral/orders-table

When to use

  • A store's orders: search, payment and fulfillment filters, sorting, export, pages and bulk actions.
  • Shops and marketplaces; any table of records that move through statuses.

When not to use

  • Records without statuses or bulk actions: a Data Table on its own is enough.
  • Work people move between stages by hand: Kanban board.

Usage

Orders table with your own data: every prop has the sample as its default, so pass only what you have.

example.tsx
import { OrdersTable } from "@/components/dashral/blocks/orders-table"

<OrdersTable
  orders={orders}
  currency="EUR"
  onUpdate={(ids, change) => api.orders.update(ids, change)}
  onCreate={() => router.push("/orders/new")}
/>

API reference

OrdersTable

A store's orders: search, payment and fulfillment filters, sorting, columns, export, and pages. Select rows to ship or deliver them together; each row's menu does the same for one order, and the table updates in place. Your orders come in as orders (a new list replaces what's shown), and every change goes to onUpdate first in the table, undone with its message if it throws.

PropTypeDefault
titleReact.ReactNode"Orders"
ordersOrder[]sample
currencystring"USD"
localestring"en-US"
onUpdate(ids: string[], change: Partial<Pick<Order, "fulfillment" | "payment">>) => Promise<void> | void

Ships, delivers or refunds orders, by id.

—
onCreate() => void—

type Payment

= "paid" | "pending" | "refunded" | "failed"

type Fulfillment

= "unfulfilled" | "shipped" | "delivered"

type Order

PropTypeDefault
idstring—
datestring—
customerstring—
emailstring—
avatarstring—
itemsnumber—
totalnumber—
paymentPayment—
fulfillmentFulfillment—