@iress-oss/ids-components 6.0.0-beta.6 → 6.0.0-beta.7
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/.ai/components/table.md +32 -0
- package/dist/Shadow-BpeuxUhT.js +57 -0
- package/dist/{Table.styles-Qfui4aZG.js → Table.styles-BLO9zGfS.js} +2 -0
- package/dist/TableRows-4ZL_EFGz.js +541 -0
- package/dist/components/Icon/helpers/getMaterialSymbolsList.js +1 -1
- package/dist/components/Table/Table.d.ts +34 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/Table.styles.js +1 -1
- package/dist/components/Table/TableBody/TableBody.js +1 -1
- package/dist/components/Table/components/TableFilterButton.js +1 -1
- package/dist/components/Table/components/TableHeader.js +1 -1
- package/dist/components/Table/components/TableHeaderCell.js +1 -1
- package/dist/components/Table/components/TableRows.d.ts +5 -1
- package/dist/components/Table/components/TableRows.js +2 -33
- package/dist/components/Table/components/TableSortButton.js +1 -1
- package/dist/components/Table/hooks/useTableColumnStyles.js +1 -1
- package/dist/components/Table/index.js +2 -2
- package/dist/{main-5Ict6dyR.js → main-CraNcMPy.js} +100 -84
- package/dist/main.js +3 -3
- package/dist/patterns/Shadow/Shadow.js +1 -1
- package/dist/patterns/Shadow/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/styled-system/recipes/table.d.ts +1 -0
- package/package.json +3 -2
- package/dist/Shadow-DcQjRh-U.js +0 -57
- /package/dist/{index.d-pXVOif1T.js → index.d-DRtQ1Pfc.js} +0 -0
package/.ai/components/table.md
CHANGED
|
@@ -309,6 +309,38 @@ The `compact` prop can be used to reduce the padding around the table cells and
|
|
|
309
309
|
|
|
310
310
|
[View "Compact" example in Storybook →](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/story/components_components-table--compact)
|
|
311
311
|
|
|
312
|
+
### Virtualisation
|
|
313
|
+
|
|
314
|
+
For tables with large datasets (hundreds or thousands of rows), virtualisation
|
|
315
|
+
renders only the visible rows to the DOM. This eliminates UI freezes during
|
|
316
|
+
bulk state updates and keeps scrolling smooth.
|
|
317
|
+
|
|
318
|
+
Enable it with the `virtualise` prop. The `virtualise` prop accepts `true` for defaults, or an options object:
|
|
319
|
+
|
|
320
|
+
| Option | Type | Default | Description |
|
|
321
|
+
| -------------- | ------------------ | ------- | ------------------------------------------------ |
|
|
322
|
+
| `height` | `number \| string` | `400` | Height of the scroll container (px or CSS value) |
|
|
323
|
+
| `overscan` | `number` | `5` | Extra rows rendered above/below the viewport |
|
|
324
|
+
| `estimateSize` | `number` | `40` | Estimated row height in pixels |
|
|
325
|
+
|
|
326
|
+
**Requirements:**
|
|
327
|
+
|
|
328
|
+
- The table container must have a bounded height (set via `height` option or
|
|
329
|
+
CSS on a parent). Without a fixed height, the browser cannot determine which
|
|
330
|
+
rows are visible.
|
|
331
|
+
- Specify `width` on each column for stable column sizing. Without explicit
|
|
332
|
+
widths, columns may shift as rows with different content lengths scroll in
|
|
333
|
+
and out of view.
|
|
334
|
+
- Sorting and filtering work normally with virtualisation enabled.
|
|
335
|
+
- Screen readers announce the correct row position via `aria-rowcount` and
|
|
336
|
+
`aria-rowindex`.
|
|
337
|
+
|
|
338
|
+
```tsx
|
|
339
|
+
<TableVirtualised />
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
[View "Virtualised" example in Storybook →](https://main--691abcc79dfa560a36d0a74f.chromatic.com/?path=/story/components_components-table--virtualised)
|
|
343
|
+
|
|
312
344
|
## `IressTableBody`
|
|
313
345
|
|
|
314
346
|
In some cases you may have a table with multiple groups of rows inside it, however the columns are the same. For these cases, you can use the `IressTableBody` component.
|