# Stock Reorder Plan block

> Spreadsheet Reorder Plan With On-Demand Column Filter Row and Summary Footer

Stock replenishment sheet on a virtualized ReUI DataGrid: an on-demand filter row with text, select and numeric rule fields, switchable footer totals, range editing with undo and redo, and a status bar. For purchasing, inventory, Excel-style grids.

- Type: Pro block
- Category: [Editing](https://web.dev.reui.io/blocks/data-grid/editing.md)
- Page: https://web.dev.reui.io/blocks/data-grid/editing/data-grid-editing-6
- Docs (Base UI): https://web.dev.reui.io/docs/components/base/data-grid.md
- Docs (Radix UI): https://web.dev.reui.io/docs/components/radix/data-grid.md
- MCP: `get_block("data-grid-editing-6")`
- Built with: Avatar, Badge, Button, Cascader, Data Grid, Dropdown Menu, Empty, Frame, Input Group, Kbd, Select, Separator, Toggle, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Stock lines with lettered columns, a bulk status change for checked rows, CSV or TSV export and keyboard undo and redo

## Agent notes

- `STOCK_LINES` is built by `buildLines` and seeds `sheetReducer` in `ReorderPlanGridView`; edits never leave the browser
- `setCheckedStatus` only dispatches a write and shows a toast for the checked lines; call your API there
- `exportLines` builds the CSV or TSV in the browser from the checked or filtered lines; use a server export for full data

## When not to use

- Task lists that need a detail sheet, a context menu and user added columns: use [Task Spreadsheet](https://web.dev.reui.io/blocks/data-grid/editing/data-grid-editing-5.md) (`get_block("data-grid-editing-5")`)
- Product rows saved in one batch behind Save and Discard buttons: use [Product Inventory](https://web.dev.reui.io/blocks/data-grid/editing/data-grid-editing-2.md) (`get_block("data-grid-editing-2")`)

## Third-party libraries

- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- TanStack Virtual v3: [API reference](https://tanstack.com/virtual/v3/docs/api/virtualizer), [docs](https://tanstack.com/virtual/v3/docs/introduction)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/data-grid-editing-6
```

## About Editing blocks

### When to use

- Admin tables whose values are typed into cells or rows, validated, then saved or discarded
- Spreadsheet work over long lists: cell ranges, paste, drag to fill and undo
- Small catalogs such as labels or pricing plans, where one record is edited and saved at a time

### When not to use

- Cell editing added to a table you already build from parts in your own layout: use [Data Grid](https://web.dev.reui.io/components/data-grid.md) (`get_component("data-grid")`)
- Rows that are only browsed, filtered and paged, with no values changed in the cells: use the [Base blocks](https://web.dev.reui.io/blocks/data-grid/base.md)
- A plain list reordered by drag, with no form to add or rename its items: use [Sortable](https://web.dev.reui.io/components/sortable.md) (`get_component("sortable")`)

### Agent notes

- Every page.tsx renders an sr-only `h1` inside a centered `min-h-svh` main; remove that wrapper when the view sits in your own page
- Rows start from a data file constant held in `useState` or `useReducer`, and nothing reaches a server; call your API where each edit or save commits

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
