Skip to content

Commit ecbc9ff

Browse files
authored
fix: minor improvements on clean install (#59)
* fix: minor issues clean install * wip: * fix: cls
1 parent 78272a0 commit ecbc9ff

33 files changed

Lines changed: 389 additions & 180 deletions

registry.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@
193193
"path": "src/lib/data-table/types.ts",
194194
"type": "registry:lib"
195195
},
196+
{
197+
"path": "src/react-table.d.ts",
198+
"type": "registry:lib"
199+
},
196200
{
197201
"path": "src/constants/date-preset.ts",
198202
"type": "registry:lib"
@@ -290,7 +294,7 @@
290294
}
291295
],
292296
"registryDependencies": [
293-
"https://data-table-filters.com/r/data-table.json",
297+
"https://data-table.openstatus.dev/r/data-table.json",
294298
"command",
295299
"kbd",
296300
"separator"
@@ -345,7 +349,7 @@
345349
}
346350
],
347351
"registryDependencies": [
348-
"https://data-table-filters.com/r/data-table.json",
352+
"https://data-table.openstatus.dev/r/data-table.json",
349353
"tooltip",
350354
"hover-card"
351355
],
@@ -379,8 +383,8 @@
379383
}
380384
],
381385
"registryDependencies": [
382-
"https://data-table-filters.com/r/data-table.json",
383-
"https://data-table-filters.com/r/data-table-cell.json",
386+
"https://data-table.openstatus.dev/r/data-table.json",
387+
"https://data-table.openstatus.dev/r/data-table-cell.json",
384388
"button",
385389
"dropdown-menu",
386390
"kbd",
@@ -419,7 +423,7 @@
419423
}
420424
],
421425
"registryDependencies": [
422-
"https://data-table-filters.com/r/data-table.json"
426+
"https://data-table.openstatus.dev/r/data-table.json"
423427
],
424428
"dependencies": ["nuqs"]
425429
},
@@ -443,7 +447,7 @@
443447
}
444448
],
445449
"registryDependencies": [
446-
"https://data-table-filters.com/r/data-table.json"
450+
"https://data-table.openstatus.dev/r/data-table.json"
447451
],
448452
"dependencies": ["zustand"]
449453
},
@@ -503,8 +507,8 @@
503507
}
504508
],
505509
"registryDependencies": [
506-
"https://data-table-filters.com/r/data-table.json",
507-
"https://data-table-filters.com/r/data-table-cell.json"
510+
"https://data-table.openstatus.dev/r/data-table.json",
511+
"https://data-table.openstatus.dev/r/data-table-cell.json"
508512
],
509513
"dependencies": ["@tanstack/react-table"]
510514
},
@@ -544,8 +548,8 @@
544548
}
545549
],
546550
"registryDependencies": [
547-
"https://data-table-filters.com/r/data-table.json",
548-
"https://data-table-filters.com/r/data-table-schema.json"
551+
"https://data-table.openstatus.dev/r/data-table.json",
552+
"https://data-table.openstatus.dev/r/data-table-schema.json"
549553
],
550554
"dependencies": ["drizzle-orm", "date-fns"]
551555
},
@@ -569,7 +573,7 @@
569573
}
570574
],
571575
"registryDependencies": [
572-
"https://data-table-filters.com/r/data-table.json"
576+
"https://data-table.openstatus.dev/r/data-table.json"
573577
],
574578
"dependencies": [
575579
"@tanstack/react-query",

skills/SKILL.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ All URLs use base `https://data-table.openstatus.dev`.
4747
4848
### Minimal Working Table (Memory Adapter)
4949

50+
> **Note:** `DataTableInfinite` internally renders `DataTableProvider`, which already wraps children with `ControlsProvider` and `DataTableStoreSync`. You do NOT need to add these separately. The only wrapper you need is `DataTableStoreProvider` (for the BYOS adapter).
51+
5052
```tsx
5153
"use client";
5254
import { DataTableInfinite } from "@/components/data-table/data-table-infinite";
53-
import { DataTableProvider } from "@/components/data-table/data-table-provider";
5455
import type { DataTableFilterField } from "@/components/data-table/types";
5556
import { useMemoryAdapter } from "@/lib/store/adapters/memory";
5657
import { DataTableStoreProvider } from "@/lib/store/provider/DataTableStoreProvider";
@@ -167,6 +168,9 @@ See [references/fetch-layer.md](references/fetch-layer.md).
167168

168169
- **Missing CSS vars**: Core injects `--color-success/warning/error/info`. Check cssVars applied to CSS.
169170
- **Import path mismatches**: shadcn CLI rewrites `@/` paths per `components.json` aliases.
170-
- **nuqs framework setup**: Next.js App Router requires `<NuqsAdapter>` in root layout.
171+
- **nuqs: silent failure or crash**: Two required setup steps — `<NuqsAdapter>` in root layout AND `<Suspense>` around the table component. See [references/store-adapters.md](references/store-adapters.md).
172+
- **nuqs: filters not applied from URL on load**: Pass server-parsed search params as `initialState` to the nuqs adapter. See the SSR Hydration section in [references/store-adapters.md](references/store-adapters.md).
173+
- **nuqs: phantom filters with empty string**: Use `field.string()` (null default), not `field.string().default("")`.
174+
- **Sheet dropdown missing**: `SheetField.type` must match the filter type (not `"readonly"`) to get the filter dropdown. Use `generateSheetFields()` to auto-derive from filter config.
171175
- **Filter not rendering**: Verify filter type string matches `FILTER_COMPONENTS` key.
172176
- **Tailwind v4**: Registry targets v4. Class syntax differs from v3.

skills/references/component-catalog.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Component Catalog
22

3-
All extension blocks install via `npx shadcn@latest add <url>` (base: `https://data-table-filters.com`).
3+
All extension blocks install via `npx shadcn@latest add <url>` (base: `https://data-table.openstatus.dev`).
44

55
## Table of Contents
66

@@ -17,7 +17,7 @@ All extension blocks install via `npx shadcn@latest add <url>` (base: `https://d
1717
## Command Palette
1818

1919
**Block:** `data-table-filter-command`
20-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-filter-command.json`
20+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-filter-command.json`
2121
**Auto-resolves:** core block, shadcn `command` + `kbd` + `separator`, `date-fns`, `lucide-react`
2222

2323
### Props
@@ -54,7 +54,7 @@ The command palette uses `useDataTable()` internally to access table context. No
5454
## Cell Renderers
5555

5656
**Block:** `data-table-cell`
57-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-cell.json`
57+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-cell.json`
5858
**Auto-resolves:** core block, shadcn `tooltip` + `hover-card`, `sonner`, `@date-fns/utc`
5959

6060
### Available Cells
@@ -93,7 +93,7 @@ const columns: ColumnDef<MyData>[] = [
9393
## Sheet Detail Panel
9494

9595
**Block:** `data-table-sheet`
96-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-sheet.json`
96+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-sheet.json`
9797
**Auto-resolves:** core block + cell renderers block, shadcn `button` + `dropdown-menu` + `kbd` + `separator` + `skeleton` + `tooltip`
9898

9999
### Components
@@ -142,19 +142,19 @@ See [store-adapters.md](store-adapters.md) for full setup details.
142142
### nuqs (URL state)
143143

144144
**Block:** `data-table-nuqs`
145-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-nuqs.json`
145+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-nuqs.json`
146146

147147
### zustand (client state)
148148

149149
**Block:** `data-table-zustand`
150-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-zustand.json`
150+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-zustand.json`
151151

152152
---
153153

154154
## Schema System
155155

156156
**Block:** `data-table-schema`
157-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-schema.json`
157+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-schema.json`
158158

159159
See [schema-api.md](schema-api.md) for full API.
160160

@@ -163,7 +163,7 @@ See [schema-api.md](schema-api.md) for full API.
163163
## Drizzle Helpers
164164

165165
**Block:** `data-table-drizzle`
166-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-drizzle.json`
166+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-drizzle.json`
167167

168168
See [drizzle-integration.md](drizzle-integration.md) for handler API.
169169

@@ -172,7 +172,7 @@ See [drizzle-integration.md](drizzle-integration.md) for handler API.
172172
## Query Layer
173173

174174
**Block:** `data-table-query`
175-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-query.json`
175+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-query.json`
176176

177177
See [fetch-layer.md](fetch-layer.md) for setup.
178178

skills/references/drizzle-integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Drizzle Integration
22

3-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-drizzle.json`
3+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-drizzle.json`
44

55
Auto-installs the schema block. Requires `drizzle-orm` in the project.
66

skills/references/fetch-layer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Fetch Layer (React Query)
22

3-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-query.json`
3+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-query.json`
44

55
Auto-installs `@tanstack/react-query` and `superjson`.
66

skills/references/schema-api.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Schema API
22

3-
**Install:** `npx shadcn@latest add https://data-table-filters.com/r/data-table-schema.json`
3+
**Install:** `npx shadcn@latest add https://data-table.openstatus.dev/r/data-table-schema.json`
44

55
## Table of Contents
66

@@ -150,6 +150,20 @@ const sheetFields = generateSheetFields<Row>(tableSchema.definition);
150150
| `generateFilterSchema()` | Store schema definition | BYOS adapter filter schema |
151151
| `generateSheetFields()` | `SheetField<T>[]` | Sheet detail panel fields |
152152
153+
### Sheet Fields & Filter Dropdowns
154+
155+
`generateSheetFields()` auto-derives each field's `type` from its filter config. This controls whether the sheet row gets a filter dropdown:
156+
157+
| `SheetField.type` | Derived from | Sheet dropdown options |
158+
| ----------------- | -------------------------- | ----------------------------------------------- |
159+
| `"readonly"` | No filter config | No dropdown — plain display + copy only |
160+
| `"checkbox"` | `.filterable("checkbox")` | "Include" (adds value to array filter) |
161+
| `"input"` | `.filterable("input")` | "Include" (sets text filter) |
162+
| `"slider"` | `.filterable("slider")` | "Less or equal", "Greater or equal", "Equal to" |
163+
| `"timerange"` | `.filterable("timerange")` | "Exact timestamp", "Same hour", "Same day" |
164+
165+
Use `generateSheetFields()` whenever possible — it handles this mapping automatically. If manually defining `sheetFields`, set `type` to match the corresponding `filterFields` entry to get the dropdown.
166+
153167
### Filter Schema for Store Adapters
154168
155169
`generateFilterSchema` produces a schema compatible with all adapters:

0 commit comments

Comments
 (0)