react-glide-table 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -2
- package/dist/compound.cjs +1104 -107
- package/dist/compound.d.cts +2 -2
- package/dist/compound.d.ts +2 -2
- package/dist/compound.js +1106 -102
- package/dist/core.cjs +873 -47
- package/dist/core.d.cts +73 -6
- package/dist/core.d.ts +73 -6
- package/dist/core.js +867 -51
- package/dist/index.cjs +1152 -121
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1134 -113
- package/dist/{types-CHQnBz91.d.cts → types-tkOzBZ4V.d.cts} +93 -1
- package/dist/{types-CHQnBz91.d.ts → types-tkOzBZ4V.d.ts} +93 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ export function Products({ data }: { data: Product[] }) {
|
|
|
79
79
|
Row/cell **state** is exposed as `data-*` attributes for Tailwind variants:
|
|
80
80
|
|
|
81
81
|
- row: `data-selected`, `data-hovered`, `data-expandable`, `data-expanded`
|
|
82
|
-
- cell: `data-merged`, `data-selection-fill`, `data-editable`, `data-editing`, `data-frozen`, …
|
|
82
|
+
- cell: `data-merged`, `data-selection-fill`, `data-editable`, `data-editing`, `data-frozen`, `data-search-match`, `data-search-active`, …
|
|
83
83
|
|
|
84
84
|
Example: `row: "data-[selected]:bg-blue-600"`.
|
|
85
85
|
|
|
@@ -244,6 +244,36 @@ Helpers (`/core`): `buildColumnFreezeOffsets`, `getColumnFreezeEdgeAttr`, `getCo
|
|
|
244
244
|
|
|
245
245
|
Contiguous same-side freezes share one island (shadow only on the outer boundary). A gap between frozen columns creates separate islands, so both sides of the gap get an edge shadow.
|
|
246
246
|
|
|
247
|
+
## Built-in search (find in page)
|
|
248
|
+
|
|
249
|
+
Opt in with `enableInlineSearch` for a Glide Data Grid–style search overlay ([demo](https://glideapps.github.io/glide-data-grid/?path=/story/glide-data-grid-dataeditor-demos--built-in-search)). This **highlights matching cells** and navigates between them — it does **not** filter rows.
|
|
250
|
+
|
|
251
|
+
On tree tables (`toggleField`), search also scans **collapsed** descendants. Navigating to a collapsed match expands the ancestor path so the cell becomes visible.
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
<ProductTable data={data} enableInlineSearch>
|
|
255
|
+
{/* columns… */}
|
|
256
|
+
</ProductTable>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
| Shortcut / control | Behavior |
|
|
260
|
+
| ------------------ | -------- |
|
|
261
|
+
| Ctrl/Cmd+F | Open (or focus) the search box |
|
|
262
|
+
| Enter / ↓ | Next match |
|
|
263
|
+
| Shift+Enter / ↑ | Previous match |
|
|
264
|
+
| Escape / Ctrl+F (in box) / ✕ | Close |
|
|
265
|
+
|
|
266
|
+
| Prop | Role |
|
|
267
|
+
| ---- | ---- |
|
|
268
|
+
| `enableInlineSearch` | Turn on search (default `false`) |
|
|
269
|
+
| `showSearch` / `onSearchClose` | Controlled overlay visibility |
|
|
270
|
+
| `searchValue` / `onSearchValueChange` | Controlled query |
|
|
271
|
+
| `searchResults` / `onSearchResultsChanged` | Override / observe matches (`[colIndex, rowIndex]`) |
|
|
272
|
+
| `data-search-match` / `data-search-active` | Match highlight hooks on cells |
|
|
273
|
+
| `classNames.search*` | Style the overlay |
|
|
274
|
+
|
|
275
|
+
Helpers (`/core`): `useInlineSearch`, `collectSearchMatchesInRange`, `formatSearchResultLabel`, …
|
|
276
|
+
|
|
247
277
|
## Public API
|
|
248
278
|
|
|
249
279
|
| Export | Path | Role |
|
|
@@ -251,7 +281,7 @@ Contiguous same-side freezes share one island (shadow only on the outer boundary
|
|
|
251
281
|
| `createTable` / `Table` | `/compound` | Compound column DSL (`Header` / `Column` / `Body` / `Pagination`) |
|
|
252
282
|
| `DataTable` | `/compound` | Unstyled default renderer (semantic HTML + slots/props) |
|
|
253
283
|
| `useGlideTable` | `/core` | Headless engine escape hatch |
|
|
254
|
-
| `useCellEdit` / `useCellSelection` / `useConvertTreeData`
|
|
284
|
+
| `useCellEdit` / `useCellSelection` / `useConvertTreeData` / `useInlineSearch` | `/core` | Feature hooks |
|
|
255
285
|
| `applyCellEdit`, `applyFillData`, `buildRowsPastePayload`, `buildColumnRowSpanMap`, … | `/core` | Pure helpers |
|
|
256
286
|
| `DEFAULT_DATA_TABLE_LABELS` / `resolveDataTableLabels` | `/core` | Optional English UI copy helpers |
|
|
257
287
|
| Tree field defaults | `/core` | `id` / `parentId` / `children` / `qty` |
|