Purpose
Allow the collapsing of long tables, down to a specified number of rows, and a button to expand the table to full-height.
Action | Purpose |
---|
expand | Show the full set of rows in the table |
truncate | Hide any rows that are greater than the specified limit number |
Target | Purpose | Default |
---|
showMore | The <tr> element that is shown when the table is truncated, and should contain an element or button that expands the table. | - |
Value | Type | Description | Default |
---|
limit | Number | The number of rows to show when the table is collapsed | 20 |
Events
Event | When | Dispatched on | event.detail |
---|
- | - | - | - |
Side Effects
- Sets "display: none" on all hidden table rows. Removes "display" style when rows are shown.
- Installs a mutation observer to watch the table body for changes, if rows are added while the table is truncated, it will recalculate the rows that should be shown/hidden.
How to Use