diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md
index 5a957ef4..56cb093d 100644
--- a/COMPONENT_INDEX.md
+++ b/COMPONENT_INDEX.md
@@ -958,6 +958,7 @@ export interface DataTableCell {
| radio | let
| No | boolean
| false
| Set to `true` for the radio selection variant |
| batchSelection | let
| No | boolean
| false
| Set to `true` to enable batch selection |
| stickyHeader | let
| No | boolean
| false
| Set to `true` to enable a sticky header |
+| useStaticWidth | let
| No | boolean
| false
| Set to `true` to use static width |
### Slots
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index da7a5789..4a746c7b 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -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": [
diff --git a/src/DataTable/DataTable.svelte b/src/DataTable/DataTable.svelte
index 9938b46c..4e373ba5 100644
--- a/src/DataTable/DataTable.svelte
+++ b/src/DataTable/DataTable.svelte
@@ -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}"
>
diff --git a/types/DataTable/DataTable.d.ts b/types/DataTable/DataTable.d.ts
index 3c9c84a7..62ed3c21 100644
--- a/types/DataTable/DataTable.d.ts
+++ b/types/DataTable/DataTable.d.ts
@@ -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<