From c95baec83fc6fd8f0d0a6e1d2e8f8d91281d7812 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 25 Mar 2021 09:37:14 +0000 Subject: [PATCH] Add table cell max width and support text truncation --- .../src/table/CellRenderer.svelte | 3 ++- .../src/table/StringRenderer.svelte | 12 ++++++++++++ packages/standard-components/src/table/Table.svelte | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 packages/standard-components/src/table/StringRenderer.svelte diff --git a/packages/standard-components/src/table/CellRenderer.svelte b/packages/standard-components/src/table/CellRenderer.svelte index 7374bc337c..0c14ec2aa5 100644 --- a/packages/standard-components/src/table/CellRenderer.svelte +++ b/packages/standard-components/src/table/CellRenderer.svelte @@ -1,4 +1,5 @@ + +
{value}
+ + diff --git a/packages/standard-components/src/table/Table.svelte b/packages/standard-components/src/table/Table.svelte index b1f2a3ef2e..a41b08b437 100644 --- a/packages/standard-components/src/table/Table.svelte +++ b/packages/standard-components/src/table/Table.svelte @@ -192,6 +192,8 @@ justify-content: flex-start; align-items: center; gap: 4px; + max-width: 320px; + overflow: hidden; } .spectrum-Table-sortedIcon { opacity: 0;