Data Grid Views
- from @gridcn
- by gridcn
Saved views add-on for the gridcn data grid: <DataGridViews /> saves, applies, updates, renames, deletes, and defaults named views of sort, filters, search, and column layout, and imports or exports one as bounded JSON checked against the live columns. useDataGridViews is the headless hook; a storage adapter (localStorage with an in-memory fallback by default, any async store) keeps the views. Zero core changes — purely additive.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @gridcn/data-grid-viewsRegistry dependencies7
- @gridcn/data-grid
- popover
- button
- button-group
- badge
- input-group
- textarea