react-glide-table 2.2.1 → 2.3.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 CHANGED
@@ -151,10 +151,11 @@ const buttonRenderer = {
151
151
  Action
152
152
  </ProductTable.Column>
153
153
  </ProductTable.Header>
154
- </ProductTable>
154
+ </ProductTable>;
155
155
  ```
156
156
 
157
157
  Same `kind` in `cellRenderers` overrides the builtin. Extra kinds are added by key.
158
+
158
159
  ## Escape hatch (`useGlideTable`)
159
160
 
160
161
  ```tsx
@@ -261,7 +262,9 @@ Helpers (`/core`): `buildRowsPastePayload`, `parseClipboardTSV`, `parseClipboard
261
262
 
262
263
  ## Column width
263
264
 
264
- `Column.width` sets the default size. `minWidth` / `maxWidth` are CSS constraints on header and body cells — they do not clamp drag-resize.
265
+ `Column.width` sets a fixed size. Columns without `width` keep leftover space.
266
+
267
+ `minWidth` / `maxWidth` (without `width`) resolve to a size inside that range, preferring `maxWidth` when space allows so content can stay on one line. Unconstrained columns (no `width`, no min/max) still receive leftover space after that. When the viewport is tight, bounded columns shrink toward `minWidth` first. They do not clamp drag-resize.
265
268
 
266
269
  ```tsx
267
270
  <ProductTable.Column field="note" minWidth={80} maxWidth={240}>
@@ -269,7 +272,7 @@ Helpers (`/core`): `buildRowsPastePayload`, `parseClipboardTSV`, `parseClipboard
269
272
  </ProductTable.Column>
270
273
  ```
271
274
 
272
- With `ColumnDef` (non-compound), put the same values on `meta.minWidth` / `meta.maxWidth`.
275
+ With `ColumnDef` (non-compound), put the same values on `meta.width` / `meta.minWidth` / `meta.maxWidth`.
273
276
 
274
277
  ## Column resize
275
278
 
@@ -334,13 +337,13 @@ Leaf columns can move across `ColumnGroup`s. Consecutive leaves that still share
334
337
  </ProductTable>
335
338
  ```
336
339
 
337
- | Prop | Role |
338
- | --------------------------------------- | ------------------------------------------------- |
339
- | `enableColumnReorder` | Turn on header drag reorder (default `false`) |
340
- | `columnOrder` / `onColumnOrderChange` | Controlled leaf id list (`string[]`) |
341
- | `Column.reorderable={false}` | Disable drag for one column (still a drop target) |
342
- | `data-reorderable` / `data-drop-edge` | Drag / drop state hooks on header cells |
343
- | `classNames.dropEdge` | Extra class while a drop edge is shown |
340
+ | Prop | Role |
341
+ | ------------------------------------- | ------------------------------------------------- |
342
+ | `enableColumnReorder` | Turn on header drag reorder (default `false`) |
343
+ | `columnOrder` / `onColumnOrderChange` | Controlled leaf id list (`string[]`) |
344
+ | `Column.reorderable={false}` | Disable drag for one column (still a drop target) |
345
+ | `data-reorderable` / `data-drop-edge` | Drag / drop state hooks on header cells |
346
+ | `classNames.dropEdge` | Extra class while a drop edge is shown |
344
347
 
345
348
  Helpers (`/core`): `applyLeafColumnOrder`, `moveColumnIds`, `collectLeafColumnIds`, `useColumnReorder`, …
346
349
 
@@ -367,12 +370,12 @@ Keep vertical stickiness on the header via `classNames.head` (e.g. `sticky top-0
367
370
  </ProductTable>
368
371
  ```
369
372
 
370
- | Prop | Role |
371
- | ---------------------------------- | --------------------------------------- |
372
- | `enableColumnFreeze` | Turn on sticky freeze (default `false`) |
373
- | `Column.frozen` / `meta.frozen` | `true` / `"left"` or `"right"` |
374
- | `data-frozen` | `"left"` / `"right"` on frozen cells |
375
- | `data-freeze-edge` | `"left"` / `"right"` / `"both"` on island boundaries |
373
+ | Prop | Role |
374
+ | ------------------------------- | ---------------------------------------------------- |
375
+ | `enableColumnFreeze` | Turn on sticky freeze (default `false`) |
376
+ | `Column.frozen` / `meta.frozen` | `true` / `"left"` or `"right"` |
377
+ | `data-frozen` | `"left"` / `"right"` on frozen cells |
378
+ | `data-freeze-edge` | `"left"` / `"right"` / `"both"` on island boundaries |
376
379
 
377
380
  Helpers (`/core`): `buildColumnFreezeOffsets`, `getColumnFreezeEdgeAttr`, `getColumnFreezeStyle`, `resolveColumnFreezeSide`.
378
381
 
@@ -390,21 +393,21 @@ On tree tables (`toggleField`), search also scans **collapsed** descendants. Nav
390
393
  </ProductTable>
391
394
  ```
392
395
 
393
- | Shortcut / control | Behavior |
394
- | ------------------ | -------- |
395
- | Ctrl/Cmd+F | Open (or focus) the search box |
396
- | Enter / ↓ | Next match |
397
- | Shift+Enter / ↑ | Previous match |
398
- | Escape / Ctrl+F (in box) / ✕ | Close |
399
-
400
- | Prop | Role |
401
- | ---- | ---- |
402
- | `enableInlineSearch` | Turn on search (default `false`) |
403
- | `showSearch` / `onSearchClose` | Controlled overlay visibility |
404
- | `searchValue` / `onSearchValueChange` | Controlled query |
396
+ | Shortcut / control | Behavior |
397
+ | ---------------------------- | ------------------------------ |
398
+ | Ctrl/Cmd+F | Open (or focus) the search box |
399
+ | Enter / ↓ | Next match |
400
+ | Shift+Enter / ↑ | Previous match |
401
+ | Escape / Ctrl+F (in box) / ✕ | Close |
402
+
403
+ | Prop | Role |
404
+ | ------------------------------------------ | --------------------------------------------------- |
405
+ | `enableInlineSearch` | Turn on search (default `false`) |
406
+ | `showSearch` / `onSearchClose` | Controlled overlay visibility |
407
+ | `searchValue` / `onSearchValueChange` | Controlled query |
405
408
  | `searchResults` / `onSearchResultsChanged` | Override / observe matches (`[colIndex, rowIndex]`) |
406
- | `data-search-match` / `data-search-active` | Match highlight hooks on cells |
407
- | `classNames.search*` | Style the overlay |
409
+ | `data-search-match` / `data-search-active` | Match highlight hooks on cells |
410
+ | `classNames.search*` | Style the overlay |
408
411
 
409
412
  Helpers (`/core`): `useInlineSearch`, `collectSearchMatchesInRange`, `formatSearchResultLabel`, …
410
413