mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
feat(data-table): support empty table body columns
This commit is contained in:
parent
04fc011e7b
commit
3c02829e73
7 changed files with 299 additions and 238 deletions
|
@ -989,23 +989,23 @@ import { DataTable } from "carbon-components-svelte";
|
|||
|
||||
### Props
|
||||
|
||||
| Prop name | Type | Default value | Description |
|
||||
| :------------- | :----------------------------------------------------------------------------------------------- | :------------ | :--------------------------------------------------------------------------------------------------------------- |
|
||||
| headers | <code>{key: string; value: string; display?: (item) => string; sort?: (a, b) => number}[]</code> | `[]` | Specify the data table headers. |
|
||||
| rows | <code>Object[]</code> | `[]` | Specify the rows the data table should render. keys defined in `headers` are used for the row ids. |
|
||||
| size | <code>"compact" | "short" | "tall"</code> | -- | Set the size of the data table. |
|
||||
| title | <code>string</code> | `""` | Specify the title of the data table. |
|
||||
| description | <code>string</code> | `""` | Specify the description of the data table. |
|
||||
| zebra | <code>boolean</code> | `false` | Set to `true` to use zebra styles. |
|
||||
| sortable | <code>boolean</code> | `false` | Set to `true` for the sortable variant. |
|
||||
| expandable | <code>boolean</code> | `false` | Set to `true` for the expandable variant. Automatically set to `true` if `batchExpansion` is `true`. |
|
||||
| batchExpansion | <code>boolean</code> | `false` | Set to `true` to enable batch expansion. |
|
||||
| expandedRowIds | <code>string[]</code> | `[]` | Specify the row ids to be expanded. |
|
||||
| radio | <code>boolean</code> | `false` | Set to `true` for the radio selection variant. |
|
||||
| selectable | <code>boolean</code> | `false` | Set to `true` for the selectable variant. Automatically set to `true` if `radio` or `batchSelection` are `true`. |
|
||||
| batchSelection | <code>boolean</code> | `false` | Set to `true` to enable batch selection. |
|
||||
| selectedRowIds | <code>string[]</code> | `[]` | Specify the row ids to be selected. |
|
||||
| stickyHeader | <code>boolean</code> | `false` | Set to `true` to enable a sticky header. |
|
||||
| Prop name | Type | Default value | Description |
|
||||
| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------- | :------------ | :--------------------------------------------------------------------------------------------------------------- |
|
||||
| headers | <code>{key: string; value: string; display?: (item) => string; sort?: (a, b) => number; empty?: boolean; columnMenu?: boolean; }[]</code> | `[]` | Specify the data table headers. |
|
||||
| rows | <code>Object[]</code> | `[]` | Specify the rows the data table should render. keys defined in `headers` are used for the row ids. |
|
||||
| size | <code>"compact" | "short" | "tall"</code> | -- | Set the size of the data table. |
|
||||
| title | <code>string</code> | `""` | Specify the title of the data table. |
|
||||
| description | <code>string</code> | `""` | Specify the description of the data table. |
|
||||
| zebra | <code>boolean</code> | `false` | Set to `true` to use zebra styles. |
|
||||
| sortable | <code>boolean</code> | `false` | Set to `true` for the sortable variant. |
|
||||
| expandable | <code>boolean</code> | `false` | Set to `true` for the expandable variant. Automatically set to `true` if `batchExpansion` is `true`. |
|
||||
| batchExpansion | <code>boolean</code> | `false` | Set to `true` to enable batch expansion. |
|
||||
| expandedRowIds | <code>string[]</code> | `[]` | Specify the row ids to be expanded. |
|
||||
| radio | <code>boolean</code> | `false` | Set to `true` for the radio selection variant. |
|
||||
| selectable | <code>boolean</code> | `false` | Set to `true` for the selectable variant. Automatically set to `true` if `radio` or `batchSelection` are `true`. |
|
||||
| batchSelection | <code>boolean</code> | `false` | Set to `true` to enable batch selection. |
|
||||
| selectedRowIds | <code>string[]</code> | `[]` | Specify the row ids to be selected. |
|
||||
| stickyHeader | <code>boolean</code> | `false` | Set to `true` to enable a sticky header. |
|
||||
|
||||
### Slots
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue