mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
fix(data-table): export useStaticWidth prop
This commit is contained in:
parent
921c3e121a
commit
676eedb1a0
4 changed files with 21 additions and 0 deletions
|
@ -958,6 +958,7 @@ export interface DataTableCell {
|
|||
| radio | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` for the radio selection variant |
|
||||
| batchSelection | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable batch selection |
|
||||
| stickyHeader | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable a sticky header |
|
||||
| useStaticWidth | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use static width |
|
||||
|
||||
### Slots
|
||||
|
||||
|
|
|
@ -2095,6 +2095,16 @@
|
|||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "useStaticWidth",
|
||||
"kind": "let",
|
||||
"description": "Set to `true` to use static width",
|
||||
"type": "boolean",
|
||||
"value": "false",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
}
|
||||
],
|
||||
"slots": [
|
||||
|
|
|
@ -91,6 +91,9 @@
|
|||
/** Set to `true` to enable a sticky header */
|
||||
export let stickyHeader = false;
|
||||
|
||||
/** Set to `true` to use static width */
|
||||
export let useStaticWidth = false;
|
||||
|
||||
import { createEventDispatcher, setContext } from "svelte";
|
||||
import { writable, derived } from "svelte/store";
|
||||
import ChevronRight16 from "carbon-icons-svelte/lib/ChevronRight16/ChevronRight16.svelte";
|
||||
|
@ -221,6 +224,7 @@
|
|||
size="{size}"
|
||||
stickyHeader="{stickyHeader}"
|
||||
sortable="{sortable}"
|
||||
useStaticWidth="{useStaticWidth}"
|
||||
>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
|
|
6
types/DataTable/DataTable.d.ts
vendored
6
types/DataTable/DataTable.d.ts
vendored
|
@ -129,6 +129,12 @@ export interface DataTableProps
|
|||
* @default false
|
||||
*/
|
||||
stickyHeader?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to use static width
|
||||
* @default false
|
||||
*/
|
||||
useStaticWidth?: boolean;
|
||||
}
|
||||
|
||||
export default class DataTable extends SvelteComponentTyped<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue