Matrix / grid editor
The spreadsheet surface for A12: fabric codes × combinations, frozen first column and header, group rows by collection, a cell cursor, dirty cells with the old value, paste from Excel / Sheets, per-cell save (PATCH) with saved / rejected states, 10,000-row windows.
Covers: M02. Exports: MatrixEditor.
Anatomy
The component as it sits in the product: English, compact, real data shapes.
States
6 states, left to right, top to bottom. A mock poll never finishes, so each state is drawn on purpose.
Density
The phone shell is always comfortable (POWERUPS #15): 44px tap targets, 16px inputs. Compact exists on desktop only; see the desktop page.
English · 中文
Staff pick en or cn (T001 Q25). Labels arrive localised; CJK falls back to PingFang SC / Noto Sans SC.
Long string · permission denied
The long-string case (PL-063) and what a role without the permission sees (the server decides; T003).
Not available to your role
Your role is missing view pricing. Nothing here is hidden by mistake: the server sends only what you can do.
Contract
The @rj/admin-kit API for this family. Mirrored in CONTRACT.md.
- Export
MatrixEditor·@rj/admin-kit- Props
rows(grouped) ·columns·value·onCellSave·frozen1 ·window10,000- States
- cursor · editing · dirty · pasted · saving · saved · rejected (422, text kept) · loading window · denied
- shadcn / Radix
- none (grid) — Table skin
- Package underneath
- react-datasheet-grid (spike first; fallback TanStack Table 8 + react-virtual + own cell focus)
- Accessibility
- role=grid, arrow keys move the cursor, Enter edits, Esc cancels; paste announces the count
- API operations
- admin.pricing.retailer.index / .update · admin.factory-matrix.show / .update (Q11) · admin.shipping.bands.bulk · admin.fitq.config
- Phone variant
- read-only card per row