Table Wrapper
<sl-table-wrapper> | SlTableWrapper
Table Wrapper can be used to extend a simple Table with interactive functions
First Column | Second Column | Thrid Column |
---|---|---|
Hello 200 | Alpha | 3 |
Hello 20 | Gamma | 40 |
Hello 1 | Delta | 15 |
Hello | Zeta | 4 |
<sl-table-wrapper searchable sortable> <table> <thead> <tr> <th>First Column</th> <th>Second Column</th> <th>Thrid Column</th> </tr> </thead> <tbody> <tr> <td>Hello 200</td> <td>Alpha</td> <td>3</td> </tr> <tr> <td>Hello 20</td> <td>Gamma</td> <td>40</td> </tr> <tr> <td>Hello 1</td> <td>Delta</td> <td>15</td> </tr> <tr> <td>Hello</td> <td>Zeta</td> <td>4</td> </tr> </tbody> </table> </sl-table-wrapper>
Importing
If you’re using the autoloader or the traditional loader, you can ignore this section. Otherwise, feel free to use any of the following snippets to cherry pick this component.
To import this component from the CDN using a script tag:
<script type="module" src="https://cdn.jsdelivr.net/npm/@viur/shoelace@1.0.8-v2.19.1/cdn/components/table-wrapper/table-wrapper.js"></script>
To import this component from the CDN using a JavaScript import:
import 'https://cdn.jsdelivr.net/npm/@viur/shoelace@1.0.8-v2.19.1/cdn/components/table-wrapper/table-wrapper.js';
To import this component using a bundler:
import '@viur/shoelace/dist/components/table-wrapper/table-wrapper.js';
To import this component as a React component:
import SlTableWrapper from '@viur/shoelace/dist/react/table-wrapper';
Slots
Name | Description |
---|---|
(default) | The default slot. |
Learn more about using slots.
Properties
Name | Description | Reflects | Type | Default |
---|---|---|---|---|
searchable
|
Wenn set searchField is shown |
|
boolean
|
false
|
sortable
|
Wenn set table header is sortable |
|
boolean
|
false
|
updateComplete |
A read-only promise that resolves when the component has finished updating. |
Learn more about attributes and properties.
Parts
Name | Description |
---|---|
search |
The search Field. |
Learn more about customizing CSS parts.