mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 04:13:02 +00:00
fix(DataTable): useStaticWidth title/description
Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>
This commit is contained in:
parent
7e0b8af685
commit
80202bfe66
3 changed files with 11 additions and 1 deletions
|
@ -202,7 +202,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<TableContainer {...$$restProps}>
|
||||
<TableContainer useStaticWidth="{useStaticWidth}" {...$$restProps}>
|
||||
{#if title || $$slots.title || description || $$slots.description}
|
||||
<div class:bx--data-table-header="{true}">
|
||||
{#if title || $$slots.title}
|
||||
|
|
|
@ -7,10 +7,14 @@
|
|||
|
||||
/** Set to `true` to enable a sticky header */
|
||||
export let stickyHeader = false;
|
||||
|
||||
/** Set to `true` to use static width */
|
||||
export let useStaticWidth = false;
|
||||
</script>
|
||||
|
||||
<div
|
||||
class:bx--data-table-container="{true}"
|
||||
class:bx--data-table-container--static="{useStaticWidth}"
|
||||
class:bx--data-table--max-width="{stickyHeader}"
|
||||
{...$$restProps}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue