mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36: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 |
|
| 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 |
|
| 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 |
|
| 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
|
### Slots
|
||||||
|
|
||||||
|
|
|
@ -2095,6 +2095,16 @@
|
||||||
"isFunction": false,
|
"isFunction": false,
|
||||||
"constant": false,
|
"constant": false,
|
||||||
"reactive": 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": [
|
"slots": [
|
||||||
|
|
|
@ -91,6 +91,9 @@
|
||||||
/** Set to `true` to enable a sticky header */
|
/** Set to `true` to enable a sticky header */
|
||||||
export let stickyHeader = false;
|
export let stickyHeader = false;
|
||||||
|
|
||||||
|
/** Set to `true` to use static width */
|
||||||
|
export let useStaticWidth = false;
|
||||||
|
|
||||||
import { createEventDispatcher, setContext } from "svelte";
|
import { createEventDispatcher, setContext } from "svelte";
|
||||||
import { writable, derived } from "svelte/store";
|
import { writable, derived } from "svelte/store";
|
||||||
import ChevronRight16 from "carbon-icons-svelte/lib/ChevronRight16/ChevronRight16.svelte";
|
import ChevronRight16 from "carbon-icons-svelte/lib/ChevronRight16/ChevronRight16.svelte";
|
||||||
|
@ -221,6 +224,7 @@
|
||||||
size="{size}"
|
size="{size}"
|
||||||
stickyHeader="{stickyHeader}"
|
stickyHeader="{stickyHeader}"
|
||||||
sortable="{sortable}"
|
sortable="{sortable}"
|
||||||
|
useStaticWidth="{useStaticWidth}"
|
||||||
>
|
>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
|
6
types/DataTable/DataTable.d.ts
vendored
6
types/DataTable/DataTable.d.ts
vendored
|
@ -129,6 +129,12 @@ export interface DataTableProps
|
||||||
* @default false
|
* @default false
|
||||||
*/
|
*/
|
||||||
stickyHeader?: boolean;
|
stickyHeader?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to use static width
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
|
useStaticWidth?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class DataTable extends SvelteComponentTyped<
|
export default class DataTable extends SvelteComponentTyped<
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue