fix(DataTable): useStaticWidth fix for title/description (#824)

* fix(DataTable): useStaticWidth title/description

Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>

* docs(DataTable): useStaticWidth title/description

Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>

* chore(deps-dev): upgrade carbon-components, sass

Co-authored-by: metonym <ericyl.us@gmail.com>
This commit is contained in:
Florian-Schoenherr 2021-09-23 17:55:06 +02:00 committed by GitHub
commit dbf1f225dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 163 additions and 110 deletions

View file

@ -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}

View file

@ -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}
>